From ee9dc9406376e2a8112c89edd3843f5359e9aef8 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 6 Aug 2025 14:22:21 +0900 Subject: [PATCH] =?UTF-8?q?enhance(frontend):=20=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=A0=E3=83=A9=E3=82=A4=E3=83=B3=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=81=8B=E3=82=89?= =?UTF-8?q?=E6=8A=95=E7=A8=BF=E3=83=95=E3=82=A9=E3=83=BC=E3=83=A0=E3=81=AE?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E6=9C=89=E7=84=A1=E3=82=92=E5=88=87=E3=82=8A?= =?UTF-8?q?=E6=9B=BF=E3=81=88=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/timeline.vue | 80 +++++++++++++----------- 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 3fe48b4d72..1a5f3edc9e 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -103,6 +103,8 @@ const withSensitive = computed({ set: (x) => saveTlFilter('withSensitive', x), }); +const showFixedPostForm = prefer.model('showFixedPostForm'); + async function chooseList(ev: MouseEvent): Promise { const lists = await userListsCache.fetch(); const items: (MenuItem | undefined)[] = [ @@ -202,49 +204,54 @@ onActivated(() => { }); const headerActions = computed(() => { - const tmp = [ - { - icon: 'ti ti-dots', - text: i18n.ts.options, - handler: (ev) => { - const menuItems: MenuItem[] = []; + const items = [{ + icon: 'ti ti-dots', + text: i18n.ts.options, + handler: (ev) => { + const menuItems: MenuItem[] = []; + menuItems.push({ + type: 'switch', + icon: 'ti ti-repeat', + text: i18n.ts.showRenotes, + ref: withRenotes, + }); + + if (isBasicTimeline(src.value) && hasWithReplies(src.value)) { menuItems.push({ type: 'switch', - icon: 'ti ti-repeat', - text: i18n.ts.showRenotes, - ref: withRenotes, + icon: 'ti ti-messages', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: withReplies, + disabled: onlyFiles, }); + } - if (isBasicTimeline(src.value) && hasWithReplies(src.value)) { - menuItems.push({ - type: 'switch', - icon: 'ti ti-messages', - text: i18n.ts.showRepliesToOthersInTimeline, - ref: withReplies, - disabled: onlyFiles, - }); - } + menuItems.push({ + type: 'switch', + icon: 'ti ti-eye-exclamation', + text: i18n.ts.withSensitive, + ref: withSensitive, + }, { + type: 'switch', + icon: 'ti ti-photo', + text: i18n.ts.fileAttachedOnly, + ref: onlyFiles, + disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false, + }, { + type: 'divider', + }, { + type: 'switch', + text: i18n.ts.showFixedPostForm, + ref: showFixedPostForm, + }); - menuItems.push({ - type: 'switch', - icon: 'ti ti-eye-exclamation', - text: i18n.ts.withSensitive, - ref: withSensitive, - }, { - type: 'switch', - icon: 'ti ti-photo', - text: i18n.ts.fileAttachedOnly, - ref: onlyFiles, - disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false, - }); - - os.popupMenu(menuItems, ev.currentTarget ?? ev.target); - }, + os.popupMenu(menuItems, ev.currentTarget ?? ev.target); }, - ]; + }]; + if (deviceKind === 'desktop') { - tmp.unshift({ + items.unshift({ icon: 'ti ti-refresh', text: i18n.ts.reload, handler: (ev: Event) => { @@ -252,7 +259,8 @@ const headerActions = computed(() => { }, }); } - return tmp; + + return items; }); const headerTabs = computed(() => [...(prefer.r.pinnedUserLists.value.map(l => ({