From 1f890c5bed835462daf41527fe876619b4b544b3 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Fri, 30 Aug 2019 04:19:49 +0900 Subject: [PATCH] Assign URL to each page of admin (#5366) * Assign URL to each page of admin * Remove cursor pointer --- src/client/app/admin/script.ts | 3 ++- src/client/app/admin/views/index.vue | 34 +++++++++++++--------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/client/app/admin/script.ts b/src/client/app/admin/script.ts index 084f23b367..3f2d6466ac 100644 --- a/src/client/app/admin/script.ts +++ b/src/client/app/admin/script.ts @@ -19,7 +19,8 @@ init(launch => { mode: 'history', base: '/admin/', routes: [ - { path: '/', component: Index }, + { path: '/:page', component: Index }, + { path: '/', redirect: '/dashboard' }, { path: '*', component: NotFound } ] }); diff --git a/src/client/app/admin/views/index.vue b/src/client/app/admin/views/index.vue index 8a13fe1bf6..1b81185749 100644 --- a/src/client/app/admin/views/index.vue +++ b/src/client/app/admin/views/index.vue @@ -18,18 +18,18 @@

{{ $t('back-to-misskey') }} @@ -102,7 +102,6 @@ export default Vue.extend({ }, data() { return { - page: 'dashboard', version, isMobile, navOpend: !isMobile, @@ -116,9 +115,9 @@ export default Vue.extend({ faDatabase, }; }, - methods: { - nav(page: string) { - this.page = page; + computed: { + page() { + return this.$route.params.page; } } }); @@ -240,11 +239,10 @@ export default Vue.extend({ list-style none font-size 15px - > li + > li > a display block padding 10px 16px margin 0 - cursor pointer user-select none color #eee transition margin-left 0.2s ease