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