diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-09 08:01:10 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-09 08:01:10 +0900 |
| commit | a8acbd6e68a93048e511d2f819ff111555e18ccd (patch) | |
| tree | 05becb05cd7a08f1a1d628bf3e71edb1820bfdee /packages | |
| parent | resolve promise (diff) | |
| download | sharkey-a8acbd6e68a93048e511d2f819ff111555e18ccd.tar.gz sharkey-a8acbd6e68a93048e511d2f819ff111555e18ccd.tar.bz2 sharkey-a8acbd6e68a93048e511d2f819ff111555e18ccd.zip | |
refactor
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/pages/settings/navbar.vue | 1 | ||||
| -rw-r--r-- | packages/frontend/src/ui/_common_/navbar-for-mobile.vue | 7 | ||||
| -rw-r--r-- | packages/frontend/src/ui/_common_/navbar.vue | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/packages/frontend/src/pages/settings/navbar.vue b/packages/frontend/src/pages/settings/navbar.vue index 91968c5300..b322b03a21 100644 --- a/packages/frontend/src/pages/settings/navbar.vue +++ b/packages/frontend/src/pages/settings/navbar.vue @@ -103,7 +103,6 @@ function removeItem(index: number) { async function save() { prefer.commit('menu', items.value.map(x => x.type)); - await reloadAsk({ reason: i18n.ts.reloadToApplySetting, unison: true }); } function reset() { diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue index b5098563bd..e0cd58439e 100644 --- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkA :class="$style.item" :activeClass="$style.active" to="/" exact> <i :class="$style.itemIcon" class="ti ti-home ti-fw"></i><span :class="$style.itemText">{{ i18n.ts.timeline }}</span> </MkA> - <template v-for="item in menu"> + <template v-for="item in prefer.r.menu.value"> <div v-if="item === '-'" :class="$style.divider"></div> <component :is="navbarItemDef[item].to ? 'MkA' : 'button'" v-else-if="navbarItemDef[item] && (navbarItemDef[item].show !== false)" class="_button" :class="[$style.item, { [$style.active]: navbarItemDef[item].active }]" :activeClass="$style.active" :to="navbarItemDef[item].to" v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}"> <i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span> @@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only </template> <script lang="ts" setup> -import { computed, defineAsyncComponent, toRef } from 'vue'; +import { computed, defineAsyncComponent } from 'vue'; import { openInstanceMenu } from './common.js'; import * as os from '@/os.js'; import { navbarItemDef } from '@/navbar.js'; @@ -59,10 +59,9 @@ import { instance } from '@/instance.js'; import { openAccountMenu as openAccountMenu_ } from '@/accounts.js'; import { $i } from '@/i.js'; -const menu = toRef(prefer.s, 'menu'); const otherMenuItemIndicated = computed(() => { for (const def in navbarItemDef) { - if (menu.value.includes(def)) continue; + if (prefer.r.menu.value.includes(def)) continue; if (navbarItemDef[def].indicated) return true; } return false; diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index faab2704a7..9c6cdecf5c 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkA v-tooltip.noDelay.right="i18n.ts.timeline" :class="$style.item" :activeClass="$style.active" to="/" exact> <i :class="$style.itemIcon" class="ti ti-home ti-fw" style="viewTransitionName: navbar-homeIcon;"></i><span :class="$style.itemText">{{ i18n.ts.timeline }}</span> </MkA> - <template v-for="item in menu"> + <template v-for="item in prefer.r.menu.value"> <div v-if="item === '-'" :class="$style.divider"></div> <component :is="navbarItemDef[item].to ? 'MkA' : 'button'" @@ -120,10 +120,9 @@ const iconOnly = computed(() => { return forceIconOnly.value || (store.r.menuDisplay.value === 'sideIcon'); }); -const menu = computed(() => prefer.s.menu); const otherMenuItemIndicated = computed(() => { for (const def in navbarItemDef) { - if (menu.value.includes(def)) continue; + if (prefer.r.menu.value.includes(def)) continue; if (navbarItemDef[def].indicated) return true; } return false; |