enhance(frontend): tweak user home page

This commit is contained in:
syuilo 2023-12-16 11:56:58 +09:00
parent 9f49b9f4d2
commit 390602837b
3 changed files with 31 additions and 33 deletions

View file

@ -136,9 +136,8 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkLazy>
</template>
<div v-if="!disableNotes">
<div style="margin-bottom: 8px;">{{ i18n.ts.featured }}</div>
<MkLazy>
<MkNotes :class="$style.tl" :noGap="true" :pagination="pagination"/>
<XTimeline :user="user"/>
</MkLazy>
</div>
</div>
@ -193,6 +192,7 @@ function calcAge(birthdate: string): number {
const XFiles = defineAsyncComponent(() => import('./index.files.vue'));
const XActivity = defineAsyncComponent(() => import('./index.activity.vue'));
const XTimeline = defineAsyncComponent(() => import('./index.timeline.vue'));
const props = withDefaults(defineProps<{
user: Misskey.entities.UserDetailed;
@ -219,14 +219,6 @@ watch(moderationNote, async () => {
await os.api('admin/update-user-note', { userId: props.user.id, text: moderationNote.value });
});
const pagination = {
endpoint: 'users/featured-notes' as const,
limit: 10,
params: computed(() => ({
userId: props.user.id,
})),
};
const style = computed(() => {
if (props.user.bannerUrl == null) return {};
return {