Only show admin settings to admins

This commit is contained in:
ThatOneCalculator 2022-12-12 10:54:24 -08:00
parent fa18993057
commit 851d2b0f66
No known key found for this signature in database
GPG key ID: 8703CACD01000000
2 changed files with 4 additions and 8 deletions

View file

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

View file

@ -31,6 +31,7 @@ import MkInfo from '@/components/MkInfo.vue';
import { scroll } from '@/scripts/scroll'; import { scroll } from '@/scripts/scroll';
import { instance } from '@/instance'; import { instance } from '@/instance';
import { version } from '@/config'; import { version } from '@/config';
import { $i } from '@/account'
import * as os from '@/os'; import * as os from '@/os';
import { lookupUser } from '@/scripts/lookup-user'; import { lookupUser } from '@/scripts/lookup-user';
import { defaultStore } from '@/store'; import { defaultStore } from '@/store';
@ -146,7 +147,7 @@ const menuDef = $computed(() => [{
to: '/admin/abuses', to: '/admin/abuses',
active: currentPage?.route.name === 'abuses', active: currentPage?.route.name === 'abuses',
}], }],
}, { }, ...(instance.disableRegistration ? [{
title: i18n.ts.settings, title: i18n.ts.settings,
items: [{ items: [{
icon: 'ph-gear-six-bold ph-lg', icon: 'ph-gear-six-bold ph-lg',
@ -188,13 +189,8 @@ const menuDef = $computed(() => [{
text: i18n.ts.proxyAccount, text: i18n.ts.proxyAccount,
to: '/admin/proxy-account', to: '/admin/proxy-account',
active: currentPage?.route.name === '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, title: i18n.ts.info,
items: [{ items: [{
icon: 'ph-database-bold ph-lg', icon: 'ph-database-bold ph-lg',