From fa21a9e48901e0efce1b0985183017ab10878df7 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 12 Dec 2022 10:54:24 -0800 Subject: [PATCH] Only show admin settings to admins --- package.json | 2 +- packages/client/src/pages/admin/index.vue | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 8a1520a13..b8666194a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.0-beta3", + "version": "13.0.0-beta4", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index f4224612b..138cd3bf6 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -31,6 +31,7 @@ import MkInfo from '@/components/MkInfo.vue'; import { scroll } from '@/scripts/scroll'; import { instance } from '@/instance'; import { version } from '@/config'; +import { $i } from '@/account' import * as os from '@/os'; import { lookupUser } from '@/scripts/lookup-user'; import { defaultStore } from '@/store'; @@ -146,7 +147,7 @@ const menuDef = $computed(() => [{ to: '/admin/abuses', active: currentPage?.route.name === 'abuses', }], -}, { +}, ...(instance.disableRegistration ? [{ title: i18n.ts.settings, items: [{ icon: 'ph-gear-six-bold ph-lg', @@ -188,13 +189,8 @@ const menuDef = $computed(() => [{ text: i18n.ts.proxyAccount, to: '/admin/proxy-account', active: currentPage?.route.name === 'proxy-account', - }, { - icon: 'ph-gear-six-bold ph-lg', - text: i18n.ts.other, - to: '/admin/other-settings', - active: currentPage?.route.name === 'other-settings', }], -}, { +}] : []), { title: i18n.ts.info, items: [{ icon: 'ph-database-bold ph-lg',