diff --git a/CHANGELOG.md b/CHANGELOG.md index fd56700e1f..5bfcca7cad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ - Fix: 公開範囲がホームのノートの埋め込みウィジェットが読み込まれない問題を修正 (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/803) - Fix: 絵文字管理画面で一部の絵文字が表示されない問題を修正 +- Fix: リモートユーザーのページでは連合されない項目(クリップ・ページ・Playなど)のタブが表示されないように + (Cherry-picked from https://github.com/okayurisotto/wisteria/commit/2b8bdeea431b1e8fc380e3b2bba5f5f37262fbf7) ### Server - Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 ) diff --git a/packages/frontend/src/pages/user/index.vue b/packages/frontend/src/pages/user/index.vue index 4787db5dbe..460d1c4478 100644 --- a/packages/frontend/src/pages/user/index.vue +++ b/packages/frontend/src/pages/user/index.vue @@ -95,51 +95,28 @@ watch(() => props.acct, fetchUser, { const headerActions = computed(() => []); -const headerTabs = computed(() => user.value ? [{ - key: 'home', - title: i18n.ts.overview, - icon: 'ti ti-home', -}, { - key: 'notes', - title: i18n.ts.notes, - icon: 'ti ti-pencil', -}, { - key: 'activity', - title: i18n.ts.activity, - icon: 'ti ti-chart-line', -}, ...(user.value.host == null ? [{ - key: 'achievements', - title: i18n.ts.achievements, - icon: 'ti ti-medal', -}] : []), ...($i && ($i.id === user.value.id || $i.isAdmin || $i.isModerator)) || user.value.publicReactions ? [{ - key: 'reactions', - title: i18n.ts.reaction, - icon: 'ti ti-mood-happy', -}] : [], { - key: 'clips', - title: i18n.ts.clips, - icon: 'ti ti-paperclip', -}, { - key: 'lists', - title: i18n.ts.lists, - icon: 'ti ti-list', -}, { - key: 'pages', - title: i18n.ts.pages, - icon: 'ti ti-news', -}, { - key: 'flashs', - title: 'Play', - icon: 'ti ti-player-play', -}, { - key: 'gallery', - title: i18n.ts.gallery, - icon: 'ti ti-icons', -}, { - key: 'raw', - title: 'Raw', - icon: 'ti ti-code', -}] : []); +const headerTabs = computed(() => { + if (user.value == null) return []; + + const isReactionsVisible = user.value.publicReactions || ($i && ($i.id === user.value.id || $i.isAdmin || $i.isModerator)); + const isLocalUser = user.value.host === null; + + return [ + { key: 'home', title: i18n.ts.overview, icon: 'ti ti-home' }, + { key: 'notes', title: i18n.ts.notes, icon: 'ti ti-pencil' }, + { key: 'activity', title: i18n.ts.activity, icon: 'ti ti-chart-line', }, + ...(isLocalUser ? [{ key: 'achievements', title: i18n.ts.achievements, icon: 'ti ti-medal' }] : []), + ...(isReactionsVisible ? [{ key: 'reactions', title: i18n.ts.reaction, icon: 'ti ti-mood-happy' }] : []), + ...(isLocalUser ? [ + { key: 'clips', title: i18n.ts.clips, icon: 'ti ti-paperclip' }, + { key: 'lists', title: i18n.ts.lists, icon: 'ti ti-list' }, + { key: 'pages', title: i18n.ts.pages, icon: 'ti ti-news' }, + { key: 'flashs', title: 'Play', icon: 'ti ti-player-play' }, + { key: 'gallery', title: i18n.ts.gallery, icon: 'ti ti-icons' }, + ] : []), + { key: 'raw', title: 'Raw', icon: 'ti ti-code' }, + ]; +}); definePageMetadata(() => ({ title: i18n.ts.user,