restoration of pinned

This commit is contained in:
Henry Jameson 2026-08-24 17:28:05 +03:00
commit 5b79cff56c
7 changed files with 11 additions and 14 deletions

View file

@ -105,7 +105,6 @@ const Status = {
isPreview: Boolean,
noHeading: Boolean,
inlineExpanded: Boolean,
showPinned: Boolean,
inProfile: Boolean,
inConversation: Boolean,
inQuote: Boolean,

View file

@ -169,7 +169,7 @@
<span class="heading-right">
<span
v-if="showPinned"
v-if="mainStatus.pinned"
class="pin"
>
<FAIcon

View file

@ -101,6 +101,10 @@ export default {
classesTab.push('active')
classesWrapper.push('active')
}
if (props.disabled) {
classesTab.push('disabled')
classesWrapper.push('disabled')
}
if (props.image) {
return (
<div class={classesWrapper.join(' ')}>

View file

@ -27,11 +27,10 @@ library.add(faCircleNotch, faCog, faMinus, faArrowUp, faCirclePlus, faCheck)
const Timeline = {
props: {
timelineRef: Object,
count: Number,
footerSlipgate: Object, // reference to an element where we should put our footer
embedded: Boolean,
inProfile: Boolean,
skipPinned: Boolean,
skipPinned: Boolean
},
data() {
return {
@ -59,6 +58,9 @@ const Timeline = {
.map((id) => useStatusesStore().allStatuses.get(id))
.filter(({ pinned }) => (this.skipPinned ? !pinned : true))
},
count() {
return this.timeline.order.length
},
newStatusCount() {
return this.timeline.newStatusCount
},
@ -190,13 +192,12 @@ const Timeline = {
if (!this.virtualScrollingEnabled) return
const statuses = this.$refs.timeline.children
if (statuses.length === 0) return
const cappedScrollIndex = Math.max(
0,
Math.min(this.virtualScrollIndex, statuses.length - 1),
)
if (statuses.length === 0) return
const height = Math.max(document.body.offsetHeight, window.pageYOffset)
const centerOfScreen = window.pageYOffset + window.innerHeight * 0.5

View file

@ -84,7 +84,7 @@
/>
</div>
</div>
<div :class="classes.footer">
<div v-if="!embedded || footerSlipgate" :class="classes.footer">
<teleport
:to="footerSlipgate"
:disabled="!embedded || !footerSlipgate"

View file

@ -100,7 +100,6 @@ const UserProfile = {
},
load(userNameOrId) {
const loadById = (userId) => {
console.log('LOAD', userId)
this.userId = userId
}
@ -139,7 +138,6 @@ const UserProfile = {
}
},
switchUser(userNameOrId) {
console.log('USER SWITCH')
this.load(userNameOrId)
},
onTabSwitch(tab) {

View file

@ -23,18 +23,14 @@
key="statuses"
class="statuses"
:label="$t('user_card.statuses')"
:count="user.statuses_count"
:title="$t('user_profile.timeline_title')"
>
<!--
<Timeline
key="statuses"
:timeline-ref="{ name: 'userPinned', argument: userId }"
embedded
in-profile
:footer-slipgate="footerRef"
/>
-->
<Timeline
:timeline-ref="{ name: 'user', argument: userId }"
embedded
@ -81,7 +77,6 @@
<Timeline
key="media"
:label="$t('user_card.media')"
:disabled="media.visibleStatusIds.size === 0"
:title="$t('user_card.media')"
:timeline-ref="{ name: 'media', argument: userId }"
embedded