diff options
| author | 果物リン <nassii74@gmail.com> | 2023-10-31 17:26:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 17:26:59 +0900 |
| commit | e2f34e3db684b2258db3e7370675afe894f5e301 (patch) | |
| tree | 7b980adb704c66eebc79eda419809186da084080 /packages/frontend | |
| parent | fix(backend): 自身の宛先なしダイレクト投稿がストリーミン... (diff) | |
| download | misskey-e2f34e3db684b2258db3e7370675afe894f5e301.tar.gz misskey-e2f34e3db684b2258db3e7370675afe894f5e301.tar.bz2 misskey-e2f34e3db684b2258db3e7370675afe894f5e301.zip | |
fix: headerActionにPC以外で空のボタンが出てしまうバグの修正 (#12202)
* headerActionにPC以外で空のボタンが出てしまうバグの修正
* fix eslint
Diffstat (limited to 'packages/frontend')
| -rw-r--r-- | packages/frontend/src/pages/timeline.vue | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index f601bc8a85..5b97385ead 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -140,36 +140,42 @@ function focus(): void { tlComponent.focus(); } -const headerActions = $computed(() => [ - ...[deviceKind === 'desktop' ? { - icon: 'ti ti-refresh', - text: i18n.ts.reload, - handler: (ev) => { - console.log('called'); - tlComponent.reloadTimeline(); - }, - } : {}], { - icon: 'ti ti-dots', - text: i18n.ts.options, - handler: (ev) => { - os.popupMenu([{ - type: 'switch', - text: i18n.ts.showRenotes, - icon: 'ti ti-repeat', - ref: $$(withRenotes), - }, src === 'local' || src === 'social' ? { - type: 'switch', - text: i18n.ts.showRepliesToOthersInTimeline, - ref: $$(withReplies), - } : undefined, { - type: 'switch', - text: i18n.ts.fileAttachedOnly, - icon: 'ti ti-photo', - ref: $$(onlyFiles), - }], ev.currentTarget ?? ev.target); +const headerActions = $computed(() => { + const tmp = [ + { + icon: 'ti ti-dots', + text: i18n.ts.options, + handler: (ev) => { + os.popupMenu([{ + type: 'switch', + text: i18n.ts.showRenotes, + icon: 'ti ti-repeat', + ref: $$(withRenotes), + }, src === 'local' || src === 'social' ? { + type: 'switch', + text: i18n.ts.showRepliesToOthersInTimeline, + ref: $$(withReplies), + } : undefined, { + type: 'switch', + text: i18n.ts.fileAttachedOnly, + icon: 'ti ti-photo', + ref: $$(onlyFiles), + }], ev.currentTarget ?? ev.target); + }, }, + ]; + if (deviceKind === 'desktop') { + tmp.unshift({ + icon: 'ti ti-refresh', + text: i18n.ts.reload, + handler: (ev: Event) => { + console.log('called'); + tlComponent.reloadTimeline(); + }, + }); } -]); + return tmp; +}); const headerTabs = $computed(() => [...(defaultStore.reactiveState.pinnedUserLists.value.map(l => ({ key: 'list:' + l.id, |