Create route for MediaProxy Cache

This commit is contained in:
Angelina Filippova 2020-07-03 02:30:15 +03:00
parent 91ccbfeda5
commit 2881730f33
2 changed files with 23 additions and 5 deletions

View file

@ -65,8 +65,11 @@ export default {
externalLink: 'External Link',
users: 'Users',
reports: 'Reports',
invites: 'Invites',
statuses: 'Statuses',
settings: 'Settings',
moderationLog: 'Moderation Log',
mediaProxyCache: 'MediaProxy Cache',
'emoji-packs': 'Emoji packs'
},
navbar: {

View file

@ -16,7 +16,7 @@ const settings = {
path: 'index',
component: () => import('@/views/settings/index'),
name: 'Settings',
meta: { title: 'Settings', icon: 'settings', noCache: true }
meta: { title: 'settings', icon: 'settings', noCache: true }
}
]
}
@ -30,7 +30,7 @@ const statuses = {
path: 'index',
component: () => import('@/views/statuses/index'),
name: 'Statuses',
meta: { title: 'Statuses', icon: 'form', noCache: true }
meta: { title: 'statuses', icon: 'form', noCache: true }
}
]
}
@ -44,7 +44,7 @@ const reports = {
path: 'index',
component: () => import('@/views/reports/index'),
name: 'Reports',
meta: { title: 'Reports', icon: 'documentation', noCache: true }
meta: { title: 'reports', icon: 'documentation', noCache: true }
}
]
}
@ -58,7 +58,7 @@ const invites = {
path: 'index',
component: () => import('@/views/invites/index'),
name: 'Invites',
meta: { title: 'Invites', icon: 'guide', noCache: true }
meta: { title: 'invites', icon: 'guide', noCache: true }
}
]
}
@ -72,7 +72,7 @@ const emojiPacks = {
path: 'index',
component: () => import('@/views/emojiPacks/index'),
name: 'Emoji Packs',
meta: { title: 'Emoji Packs', icon: 'eye-open', noCache: true }
meta: { title: 'emoji-packs', icon: 'eye-open', noCache: true }
}
]
}
@ -91,6 +91,20 @@ const moderationLog = {
]
}
const mediaProxyCacheDisabled = disabledFeatures.includes('media-proxy-cache')
const mediaProxyCache = {
path: '/media_proxy_cache',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/mediaProxyCache/index'),
name: 'MediaProxy Cache',
meta: { title: 'mediaProxyCache', icon: 'example', noCache: true }
}
]
}
export const constantRouterMap = [
{
path: '/redirect',
@ -159,6 +173,7 @@ export const asyncRouterMap = [
...(invitesDisabled ? [] : [invites]),
...(emojiPacksDisabled ? [] : [emojiPacks]),
...(moderationLogDisabled ? [] : [moderationLog]),
...(mediaProxyCacheDisabled ? [] : [mediaProxyCache]),
...(settingsDisabled ? [] : [settings]),
{
path: '/users/:id',