preserve refresh button on mobile UI

This commit is contained in:
Hazel K 2024-10-06 12:20:06 -04:00
parent 01fb606fee
commit 60d0e3df7b
1 changed files with 40 additions and 33 deletions

View File

@ -169,13 +169,17 @@ const withUserRenotes = ref(false);
const withUserReplies = ref(true); const withUserReplies = ref(true);
const withOnlyFiles = ref(false); const withOnlyFiles = ref(false);
const headerActions = computed(() => isWideViewport.value ? [ const headerActions = computed(() => {
const actions: PageHeaderItem[] = [
{ {
icon: 'ti ti-refresh', icon: 'ti ti-refresh',
text: i18n.ts.reload, text: i18n.ts.reload,
handler: () => reload(), handler: () => reload(),
} satisfies PageHeaderItem, },
{ ];
if (isWideViewport.value) {
actions.push({
icon: 'ti ti-dots', icon: 'ti ti-dots',
text: i18n.ts.options, text: i18n.ts.options,
handler: (ev) => { handler: (ev) => {
@ -201,8 +205,11 @@ const headerActions = computed(() => isWideViewport.value ? [
}, },
], ev.currentTarget ?? ev.target); ], ev.currentTarget ?? ev.target);
}, },
} satisfies PageHeaderItem, });
] : []); }
return actions;
});
const headerTabs = computed(() => [ const headerTabs = computed(() => [
{ {