Rename paths to settings tabs
This commit is contained in:
parent
584c456b43
commit
e6d1489a9a
3 changed files with 27 additions and 27 deletions
|
@ -10,10 +10,10 @@ const disabledFeatures = process.env.DISABLED_FEATURES || []
|
|||
const settingsDisabled = disabledFeatures.includes('settings')
|
||||
const settingsChildren = () => {
|
||||
return localStorage.getItem('settingsTabs')
|
||||
? JSON.parse(localStorage.getItem('settingsTabs')).map(({ label, value }) => {
|
||||
? JSON.parse(localStorage.getItem('settingsTabs')).map(({ label, path }) => {
|
||||
return {
|
||||
path: value,
|
||||
component: () => import(`@/views/settings/components/${label}`),
|
||||
path,
|
||||
component: () => import(`@/views/settings`),
|
||||
name: label,
|
||||
meta: { title: label }
|
||||
}
|
||||
|
|
|
@ -104,27 +104,27 @@ const settings = {
|
|||
const response = await fetchSettings(getters.authHost, getters.token)
|
||||
const realResponse = { ...response,
|
||||
tabs: [
|
||||
{ label: 'ActivityPub', value: 'activityPub' },
|
||||
{ label: 'Authentication', value: 'auth' },
|
||||
{ label: 'Captcha', value: 'captcha' },
|
||||
{ label: 'BBS / SSH access', value: 'esshd' },
|
||||
{ label: 'Emoji', value: 'emoji' },
|
||||
{ label: 'Frontend', value: 'frontend' },
|
||||
{ label: 'Gopher', value: 'gopher' },
|
||||
{ label: 'HTTP', value: 'http' },
|
||||
{ label: 'Instance', value: 'instance' },
|
||||
{ label: 'Job queue', value: 'jobQueue' },
|
||||
{ label: 'Link Formatter', value: 'linkFormatter' },
|
||||
{ label: 'Logger', value: 'logger' },
|
||||
{ label: 'Mailer', value: 'mailer' },
|
||||
{ label: 'Media Proxy', value: 'mediaProxy' },
|
||||
{ label: 'Metadata', value: 'metadata' },
|
||||
{ label: 'MRF', value: 'mrf' },
|
||||
{ label: 'Rate limiters', value: 'rateLimiters' },
|
||||
{ label: 'Relays', value: 'relays' },
|
||||
{ label: 'Web push encryption', value: 'webPush' },
|
||||
{ label: 'Upload', value: 'upload' },
|
||||
{ label: 'Other', value: 'other' }
|
||||
{ label: 'ActivityPub', path: 'activity-pub' },
|
||||
{ label: 'Authentication', path: 'authentication' },
|
||||
{ label: 'Captcha', path: 'captcha' },
|
||||
{ label: 'BBS / SSH access', path: 'esshd' },
|
||||
{ label: 'Emoji', path: 'emoji' },
|
||||
{ label: 'Frontend', path: 'frontend' },
|
||||
{ label: 'Gopher', path: 'gopher' },
|
||||
{ label: 'HTTP', path: 'http' },
|
||||
{ label: 'Instance', path: 'instance' },
|
||||
{ label: 'Job queue', path: 'job-queue' },
|
||||
{ label: 'Link Formatter', path: 'link-formatter' },
|
||||
{ label: 'Logger', path: 'logger' },
|
||||
{ label: 'Mailer', path: 'mailer' },
|
||||
{ label: 'Media Proxy', path: 'media-proxy' },
|
||||
{ label: 'Metadata', path: 'metadata' },
|
||||
{ label: 'MRF', path: 'mrf' },
|
||||
{ label: 'Rate limiters', path: 'rate-limiters' },
|
||||
{ label: 'Relays', path: 'relays' },
|
||||
{ label: 'Web push encryption', path: 'web-push' },
|
||||
{ label: 'Upload', path: 'upload' },
|
||||
{ label: 'Other', path: 'other' }
|
||||
]
|
||||
}
|
||||
const description = await fetchDescription(getters.authHost, getters.token)
|
||||
|
|
|
@ -60,10 +60,10 @@ export default {
|
|||
const menuItems = this.tabs
|
||||
localStorage.setItem('settingsTabs', JSON.stringify(menuItems))
|
||||
|
||||
menuItems.forEach(({ label, value }) => {
|
||||
menuItems.forEach(({ label, path }) => {
|
||||
router.addRoute('Settings', {
|
||||
path: value,
|
||||
component: () => import(`@/views/settings/components/${label}`),
|
||||
path,
|
||||
component: () => import(`@/views/settings`),
|
||||
name: label,
|
||||
meta: { title: label }
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue