From 692284886b1038d5f390be4dd9195c3d76ea3ca9 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Mon, 25 Aug 2025 17:04:49 +0900 Subject: [PATCH] refactor --- packages/frontend/src/pages/about.vue | 44 ++++++++++----------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 0edf2db1eb..ba9acd3ad2 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -48,34 +48,22 @@ watch(tab, () => { const headerActions = computed(() => []); -const headerTabs = computed(() => { - const items = []; - - items.push({ - key: 'overview', - title: i18n.ts.overview, - }, { - key: 'emojis', - title: i18n.ts.customEmojis, - icon: 'ti ti-icons', - }); - - if (instance.federation !== 'none') { - items.push({ - key: 'federation', - title: i18n.ts.federation, - icon: 'ti ti-whirl', - }); - } - - items.push({ - key: 'charts', - title: i18n.ts.charts, - icon: 'ti ti-chart-line', - }); - - return items; -}); +const headerTabs = computed(() => [{ + key: 'overview', + title: i18n.ts.overview, +}, { + key: 'emojis', + title: i18n.ts.customEmojis, + icon: 'ti ti-icons', +}, ...(instance.federation !== 'none' ? [{ + key: 'federation', + title: i18n.ts.federation, + icon: 'ti ti-whirl', +}] : []), { + key: 'charts', + title: i18n.ts.charts, + icon: 'ti ti-chart-line', +}]); definePage(() => ({ title: i18n.ts.instanceInfo,