From 9f35ca2bd08aece6c54d087f4481ce140bbeab31 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Wed, 1 Nov 2023 22:11:01 +0100 Subject: [PATCH] fix: avatar decorations management being open to everyone --- packages/frontend/src/pages/admin/index.vue | 2 +- packages/frontend/src/router.ts | 4 ---- packages/frontend/src/ui/_common_/common.ts | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index a42e9809ed..4ada8f9a40 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -133,7 +133,7 @@ const menuDef = $computed(() => [{ }, { icon: 'ph-sparkle ph-bold ph-lg', text: i18n.ts.avatarDecorations, - to: '/avatar-decorations', + to: '/admin/avatar-decorations', active: currentPage?.route.name === 'avatarDecorations', }, { icon: 'ph-globe-hemisphere-west ph-bold ph-lg', diff --git a/packages/frontend/src/router.ts b/packages/frontend/src/router.ts index 1a547e9849..00d7ceac3d 100644 --- a/packages/frontend/src/router.ts +++ b/packages/frontend/src/router.ts @@ -313,10 +313,6 @@ export const routes = [{ }, { path: '/custom-emojis-manager', component: page(() => import('./pages/custom-emojis-manager.vue')), -}, { - path: '/avatar-decorations', - name: 'avatarDecorations', - component: page(() => import('./pages/avatar-decorations.vue')), }, { path: '/registry/keys/system/:path(*)?', component: page(() => import('./pages/registry.keys.vue')), diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts index a3a2eb14b3..72ad8a7320 100644 --- a/packages/frontend/src/ui/_common_/common.ts +++ b/packages/frontend/src/ui/_common_/common.ts @@ -33,7 +33,7 @@ function toolsMenuItems(): MenuItem[] { icon: 'ph-smiley ph-bold pg-lg', } : undefined, ($i && ($i.isAdmin || $i.policies.canManageAvatarDecorations)) ? { type: 'link', - to: '/avatar-decorations', + to: '/admin/avatar-decorations', text: i18n.ts.manageAvatarDecorations, icon: 'ph-sparkle ph-bold pg-lg', } : undefined];