Only show admin settings to admins

This commit is contained in:
ThatOneCalculator 2022-12-12 10:54:24 -08:00
parent c438b6b918
commit fa21a9e489
2 changed files with 4 additions and 8 deletions

View file

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "13.0.0-beta3",
"version": "13.0.0-beta4",
"codename": "aqua",
"repository": {
"type": "git",

View file

@ -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',