From 64fa8d2bf4f298d532fffd6c1f9f050be050cf85 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 3 Jan 2023 18:16:04 +0100 Subject: [PATCH] ui: move settings to nav side --- components/nav/NavBottomMoreMenu.vue | 11 ----------- components/nav/NavFooter.vue | 9 --------- components/nav/NavSide.vue | 3 ++- components/user/UserSwitcher.vue | 6 ------ composables/command.ts | 6 +++--- pages/settings.vue | 4 ++-- pages/settings/index.vue | 2 +- 7 files changed, 8 insertions(+), 33 deletions(-) diff --git a/components/nav/NavBottomMoreMenu.vue b/components/nav/NavBottomMoreMenu.vue index 05b64c5e..6dd117c9 100644 --- a/components/nav/NavBottomMoreMenu.vue +++ b/components/nav/NavBottomMoreMenu.vue @@ -86,17 +86,6 @@ onBeforeUnmount(() => { {{ colorMode.value === 'light' ? $t('menu.toggle_theme.dark') : $t('menu.toggle_theme.light') }} - - - {{ $t('nav.settings') }} - diff --git a/components/nav/NavFooter.vue b/components/nav/NavFooter.vue index d5ea4e98..edbc9cf7 100644 --- a/components/nav/NavFooter.vue +++ b/components/nav/NavFooter.vue @@ -27,15 +27,6 @@ function toggleDark() { @click="toggleZenMode()" /> - - -
- - - { } }) -export const useCommand = (cmd: CommandProvider) => { +export function useCommand(cmd: CommandProvider) { const registry = useCommandRegistry() const register = () => registry.register(cmd) @@ -217,7 +217,7 @@ export const useCommand = (cmd: CommandProvider) => { tryOnScopeDispose(cleanup) } -export const useCommands = (cmds: () => CommandProvider[]) => { +export function useCommands(cmds: () => CommandProvider[]) { const registry = useCommandRegistry() const commands = computed(cmds) @@ -263,7 +263,7 @@ export const provideGlobalCommands = () => { scope: 'Navigation', name: () => t('nav.settings'), - icon: 'i-ri:settings-4-line', + icon: 'i-ri:settings-3-line', onActivate() { router.push('/settings') diff --git a/pages/settings.vue b/pages/settings.vue index 08a61dc4..e4aa13d7 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -15,7 +15,7 @@ const isRootPath = computedEager(() => route.name === 'settings') @@ -41,7 +41,7 @@ const isRootPath = computedEager(() => route.name === 'settings') /> diff --git a/pages/settings/index.vue b/pages/settings/index.vue index 44a1ae90..c0ee6207 100644 --- a/pages/settings/index.vue +++ b/pages/settings/index.vue @@ -1,7 +1,7 @@