Merge branch 'develop' into feature/2024.9.0
This commit is contained in:
commit
02d36c4518
10 changed files with 102 additions and 62 deletions
|
|
@ -130,10 +130,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
|
||||
<div class="contents _gaps">
|
||||
<div v-if="user.pinnedNotes.length > 0" class="_gaps">
|
||||
<MkNote v-for="note in user.pinnedNotes" :key="note.id" class="note _panel" :note="note" :pinned="true"/>
|
||||
</div>
|
||||
<MkInfo v-else-if="$i && $i.id === user.id">{{ i18n.ts.userPagePinTip }}</MkInfo>
|
||||
<MkInfo v-if="user.pinnedNotes.length === 0 && $i?.id === user.id">{{ i18n.ts.userPagePinTip }}</MkInfo>
|
||||
<template v-if="narrow">
|
||||
<MkLazy>
|
||||
<XFiles :key="user.id" :user="user"/>
|
||||
|
|
@ -152,14 +149,27 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div> -->
|
||||
<MkStickyContainer>
|
||||
<template #header>
|
||||
<!-- You can't use v-if on these, as MkTab first *deletes* and replaces all children with native HTML elements. -->
|
||||
<!-- Instead, we add a "no notes" placeholder and default to null (all notes) if there's nothing pinned. -->
|
||||
<!-- It also converts all comments into text! -->
|
||||
<MkTab v-model="noteview" :class="$style.tab">
|
||||
<option value="pinned">{{ i18n.ts.pinnedOnly }}</option>
|
||||
<option :value="null">{{ i18n.ts.notes }}</option>
|
||||
<option value="all">{{ i18n.ts.all }}</option>
|
||||
<option value="files">{{ i18n.ts.withFiles }}</option>
|
||||
</MkTab>
|
||||
</template>
|
||||
<MkLazy>
|
||||
<MkNotes :class="$style.tl" :noGap="true" :pagination="AllPagination"/>
|
||||
<div v-if="noteview === 'pinned'" class="_gaps">
|
||||
<div v-if="user.pinnedNotes.length < 1" class="_fullinfo">
|
||||
<img :src="infoImageUrl" class="_ghost" aria-hidden="true" :alt="i18n.ts.noNotes"/>
|
||||
<div>{{ i18n.ts.noNotes }}</div>
|
||||
</div>
|
||||
<div v-else class="_panel">
|
||||
<MkNote v-for="note of user.pinnedNotes" :key="note.id" class="note" :class="$style.pinnedNote" :note="note" :pinned="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkNotes v-else :class="$style.tl" :noGap="true" :pagination="AllPagination"/>
|
||||
</MkLazy>
|
||||
</MkStickyContainer>
|
||||
</div>
|
||||
|
|
@ -199,6 +209,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
|
|||
import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import { getStaticImageUrl } from '@/scripts/media-proxy.js';
|
||||
import { infoImageUrl } from '@/instance.js';
|
||||
|
||||
const MkNote = defineAsyncComponent(() =>
|
||||
(defaultStore.state.noteDesign === 'misskey') ? import('@/components/MkNote.vue') :
|
||||
|
|
@ -809,7 +820,7 @@ onUnmounted(() => {
|
|||
}
|
||||
|
||||
.tab {
|
||||
margin: calc(var(--margin) / 2) 0;
|
||||
margin-bottom: calc(var(--margin) / 2);
|
||||
padding: calc(var(--margin) / 2) 0;
|
||||
background: color-mix(in srgb, var(--bg) 65%, transparent);
|
||||
backdrop-filter: var(--blur, blur(15px));
|
||||
|
|
@ -826,4 +837,8 @@ onUnmounted(() => {
|
|||
margin-left: 4px;
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.pinnedNote:not(:last-child) {
|
||||
border-bottom: solid 0.5px var(--divider);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue