Skip to content
Snippets Groups Projects
Commit e6d1489a authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Rename paths to settings tabs

parent 584c456b
No related branches found
No related tags found
1 merge request!195Move Settings tab navigation to the main sidebar menu
......@@ -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 }
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment