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('dashboard') }}
- - {{ $t('instance') }}
- - {{ $t('queue') }}
- - {{ $t('logs') }}
- - {{ $t('db') }}
- - {{ $t('moderators') }}
- - {{ $t('users') }}
- - {{ $t('@.drive') }}
- - {{ $t('federation') }}
- - {{ $t('emoji') }}
- - {{ $t('announcements') }}
- - {{ $t('abuse') }}
+ - {{ $t('dashboard') }}
+ - {{ $t('instance') }}
+ - {{ $t('queue') }}
+ - {{ $t('logs') }}
+ - {{ $t('db') }}
+ - {{ $t('moderators') }}
+ - {{ $t('users') }}
+ - {{ $t('@.drive') }}
+ - {{ $t('federation') }}
+ - {{ $t('emoji') }}
+ - {{ $t('announcements') }}
+ - {{ $t('abuse') }}
{{ $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