From e3d891612f46acca5e4c46071836e0a33621bf2a Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Mon, 8 Mar 2021 19:35:02 +0800 Subject: [PATCH] Add Route for Relays, update icons --- src/lang/en.js | 1 + src/router/index.js | 29 +++++++++++++++----- src/views/layout/components/Sidebar/Item.vue | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index d9951f61..69737808 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -70,6 +70,7 @@ export default { chats: 'Chats', settings: 'Settings', moderationLog: 'Moderation Log', + relays: 'Relays', mediaProxyCache: 'MediaProxy Cache', 'emoji-packs': 'Emoji packs' }, diff --git a/src/router/index.js b/src/router/index.js index 5386fdc4..60b39bfe 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -38,7 +38,7 @@ const settings = { component: Layout, name: 'Settings', hasSubmenu: true, - meta: { title: 'settings', icon: 'settings', noCache: true }, + meta: { title: 'settings', icon: 'el-icon-setting', noCache: true }, children: settingsChildren() } const statusesDisabled = disabledFeatures.includes('statuses') @@ -50,7 +50,7 @@ const statuses = { path: 'index', component: () => import('@/views/statuses/index'), name: 'Statuses', - meta: { title: 'statuses', icon: 'form', noCache: true } + meta: { title: 'statuses', icon: 'el-icon-chat-line-square', noCache: true } } ] } @@ -64,7 +64,7 @@ const reports = { path: 'index', component: () => import('@/views/reports/index'), name: 'Reports', - meta: { title: 'reports', icon: 'documentation', noCache: true } + meta: { title: 'reports', icon: 'el-icon-receiving', noCache: true } } ] } @@ -78,7 +78,21 @@ const invites = { path: 'index', component: () => import('@/views/invites/index'), name: 'Invites', - meta: { title: 'invites', icon: 'guide', noCache: true } + meta: { title: 'invites', icon: 'el-icon-postcard', noCache: true } + } + ] +} + +const relaysDisabled = disabledFeatures.includes('relays') +const relays = { + path: '/relays', + component: Layout, + children: [ + { + path: 'index', + component: () => import('@/views/relays/index'), + name: 'Relays', + meta: { title: 'relays', icon: 'el-icon-connection', noCache: true } } ] } @@ -92,7 +106,7 @@ const moderationLog = { path: 'index', component: () => import('@/views/moderation_log/index'), name: 'Moderation Log', - meta: { title: 'moderationLog', icon: 'list', noCache: true } + meta: { title: 'moderationLog', icon: 'el-icon-notebook-2', noCache: true } } ] } @@ -106,7 +120,7 @@ const mediaProxyCache = { path: 'index', component: () => import('@/views/mediaProxyCache/index'), name: 'MediaProxy Cache', - meta: { title: 'mediaProxyCache', icon: 'example', noCache: true } + meta: { title: 'mediaProxyCache', icon: 'el-icon-coin', noCache: true } } ] } @@ -171,7 +185,7 @@ export const asyncRouterMap = [ path: 'index', component: () => import('@/views/users/index'), name: 'Users', - meta: { title: 'users', icon: 'peoples', noCache: true } + meta: { title: 'users', icon: 'el-icon-user', noCache: true } } ] }, @@ -179,6 +193,7 @@ export const asyncRouterMap = [ ...(reportsDisabled ? [] : [reports]), ...(invitesDisabled ? [] : [invites]), ...(moderationLogDisabled ? [] : [moderationLog]), + ...(relaysDisabled ? [] : [relays]), ...(mediaProxyCacheDisabled ? [] : [mediaProxyCache]), ...(settingsDisabled ? [] : [settings]), { diff --git a/src/views/layout/components/Sidebar/Item.vue b/src/views/layout/components/Sidebar/Item.vue index 1a7e5f2d..02fcdd3c 100644 --- a/src/views/layout/components/Sidebar/Item.vue +++ b/src/views/layout/components/Sidebar/Item.vue @@ -1,6 +1,6 @@