restoration of pinned
This commit is contained in:
parent
39cfa6a5dd
commit
5b79cff56c
7 changed files with 11 additions and 14 deletions
|
|
@ -105,7 +105,6 @@ const Status = {
|
||||||
isPreview: Boolean,
|
isPreview: Boolean,
|
||||||
noHeading: Boolean,
|
noHeading: Boolean,
|
||||||
inlineExpanded: Boolean,
|
inlineExpanded: Boolean,
|
||||||
showPinned: Boolean,
|
|
||||||
inProfile: Boolean,
|
inProfile: Boolean,
|
||||||
inConversation: Boolean,
|
inConversation: Boolean,
|
||||||
inQuote: Boolean,
|
inQuote: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
|
|
||||||
<span class="heading-right">
|
<span class="heading-right">
|
||||||
<span
|
<span
|
||||||
v-if="showPinned"
|
v-if="mainStatus.pinned"
|
||||||
class="pin"
|
class="pin"
|
||||||
>
|
>
|
||||||
<FAIcon
|
<FAIcon
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,10 @@ export default {
|
||||||
classesTab.push('active')
|
classesTab.push('active')
|
||||||
classesWrapper.push('active')
|
classesWrapper.push('active')
|
||||||
}
|
}
|
||||||
|
if (props.disabled) {
|
||||||
|
classesTab.push('disabled')
|
||||||
|
classesWrapper.push('disabled')
|
||||||
|
}
|
||||||
if (props.image) {
|
if (props.image) {
|
||||||
return (
|
return (
|
||||||
<div class={classesWrapper.join(' ')}>
|
<div class={classesWrapper.join(' ')}>
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,10 @@ library.add(faCircleNotch, faCog, faMinus, faArrowUp, faCirclePlus, faCheck)
|
||||||
const Timeline = {
|
const Timeline = {
|
||||||
props: {
|
props: {
|
||||||
timelineRef: Object,
|
timelineRef: Object,
|
||||||
count: Number,
|
|
||||||
footerSlipgate: Object, // reference to an element where we should put our footer
|
footerSlipgate: Object, // reference to an element where we should put our footer
|
||||||
embedded: Boolean,
|
embedded: Boolean,
|
||||||
inProfile: Boolean,
|
inProfile: Boolean,
|
||||||
skipPinned: Boolean,
|
skipPinned: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -59,6 +58,9 @@ const Timeline = {
|
||||||
.map((id) => useStatusesStore().allStatuses.get(id))
|
.map((id) => useStatusesStore().allStatuses.get(id))
|
||||||
.filter(({ pinned }) => (this.skipPinned ? !pinned : true))
|
.filter(({ pinned }) => (this.skipPinned ? !pinned : true))
|
||||||
},
|
},
|
||||||
|
count() {
|
||||||
|
return this.timeline.order.length
|
||||||
|
},
|
||||||
newStatusCount() {
|
newStatusCount() {
|
||||||
return this.timeline.newStatusCount
|
return this.timeline.newStatusCount
|
||||||
},
|
},
|
||||||
|
|
@ -190,13 +192,12 @@ const Timeline = {
|
||||||
if (!this.virtualScrollingEnabled) return
|
if (!this.virtualScrollingEnabled) return
|
||||||
|
|
||||||
const statuses = this.$refs.timeline.children
|
const statuses = this.$refs.timeline.children
|
||||||
|
if (statuses.length === 0) return
|
||||||
const cappedScrollIndex = Math.max(
|
const cappedScrollIndex = Math.max(
|
||||||
0,
|
0,
|
||||||
Math.min(this.virtualScrollIndex, statuses.length - 1),
|
Math.min(this.virtualScrollIndex, statuses.length - 1),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (statuses.length === 0) return
|
|
||||||
|
|
||||||
const height = Math.max(document.body.offsetHeight, window.pageYOffset)
|
const height = Math.max(document.body.offsetHeight, window.pageYOffset)
|
||||||
|
|
||||||
const centerOfScreen = window.pageYOffset + window.innerHeight * 0.5
|
const centerOfScreen = window.pageYOffset + window.innerHeight * 0.5
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div :class="classes.footer">
|
<div v-if="!embedded || footerSlipgate" :class="classes.footer">
|
||||||
<teleport
|
<teleport
|
||||||
:to="footerSlipgate"
|
:to="footerSlipgate"
|
||||||
:disabled="!embedded || !footerSlipgate"
|
:disabled="!embedded || !footerSlipgate"
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ const UserProfile = {
|
||||||
},
|
},
|
||||||
load(userNameOrId) {
|
load(userNameOrId) {
|
||||||
const loadById = (userId) => {
|
const loadById = (userId) => {
|
||||||
console.log('LOAD', userId)
|
|
||||||
this.userId = userId
|
this.userId = userId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +138,6 @@ const UserProfile = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
switchUser(userNameOrId) {
|
switchUser(userNameOrId) {
|
||||||
console.log('USER SWITCH')
|
|
||||||
this.load(userNameOrId)
|
this.load(userNameOrId)
|
||||||
},
|
},
|
||||||
onTabSwitch(tab) {
|
onTabSwitch(tab) {
|
||||||
|
|
|
||||||
|
|
@ -23,18 +23,14 @@
|
||||||
key="statuses"
|
key="statuses"
|
||||||
class="statuses"
|
class="statuses"
|
||||||
:label="$t('user_card.statuses')"
|
:label="$t('user_card.statuses')"
|
||||||
:count="user.statuses_count"
|
|
||||||
:title="$t('user_profile.timeline_title')"
|
:title="$t('user_profile.timeline_title')"
|
||||||
>
|
>
|
||||||
<!--
|
|
||||||
<Timeline
|
<Timeline
|
||||||
key="statuses"
|
key="statuses"
|
||||||
:timeline-ref="{ name: 'userPinned', argument: userId }"
|
:timeline-ref="{ name: 'userPinned', argument: userId }"
|
||||||
embedded
|
embedded
|
||||||
in-profile
|
in-profile
|
||||||
:footer-slipgate="footerRef"
|
|
||||||
/>
|
/>
|
||||||
-->
|
|
||||||
<Timeline
|
<Timeline
|
||||||
:timeline-ref="{ name: 'user', argument: userId }"
|
:timeline-ref="{ name: 'user', argument: userId }"
|
||||||
embedded
|
embedded
|
||||||
|
|
@ -81,7 +77,6 @@
|
||||||
<Timeline
|
<Timeline
|
||||||
key="media"
|
key="media"
|
||||||
:label="$t('user_card.media')"
|
:label="$t('user_card.media')"
|
||||||
:disabled="media.visibleStatusIds.size === 0"
|
|
||||||
:title="$t('user_card.media')"
|
:title="$t('user_card.media')"
|
||||||
:timeline-ref="{ name: 'media', argument: userId }"
|
:timeline-ref="{ name: 'media', argument: userId }"
|
||||||
embedded
|
embedded
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue