forked from FoundKeyGang/FoundKey
Assign URL to each page of admin (#5366)
* Assign URL to each page of admin * Remove cursor pointer
This commit is contained in:
parent
97f23af86d
commit
1f890c5bed
2 changed files with 18 additions and 19 deletions
|
@ -19,7 +19,8 @@ init(launch => {
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
base: '/admin/',
|
base: '/admin/',
|
||||||
routes: [
|
routes: [
|
||||||
{ path: '/', component: Index },
|
{ path: '/:page', component: Index },
|
||||||
|
{ path: '/', redirect: '/dashboard' },
|
||||||
{ path: '*', component: NotFound }
|
{ path: '*', component: NotFound }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,18 +18,18 @@
|
||||||
<p class="name"><mk-user-name :user="$store.state.i"/></p>
|
<p class="name"><mk-user-name :user="$store.state.i"/></p>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li @click="nav('dashboard')" :class="{ active: page == 'dashboard' }"><fa icon="home" fixed-width/>{{ $t('dashboard') }}</li>
|
<li><router-link to="/dashboard" active-class="active"><fa icon="home" fixed-width/>{{ $t('dashboard') }}</router-link></li>
|
||||||
<li @click="nav('instance')" :class="{ active: page == 'instance' }"><fa icon="cog" fixed-width/>{{ $t('instance') }}</li>
|
<li><router-link to="/instance" active-class="active"><fa icon="cog" fixed-width/>{{ $t('instance') }}</router-link></li>
|
||||||
<li @click="nav('queue')" :class="{ active: page == 'queue' }"><fa :icon="faTasks" fixed-width/>{{ $t('queue') }}</li>
|
<li><router-link to="/queue" active-class="active"><fa :icon="faTasks" fixed-width/>{{ $t('queue') }}</router-link></li>
|
||||||
<li @click="nav('logs')" :class="{ active: page == 'logs' }"><fa :icon="faStream" fixed-width/>{{ $t('logs') }}</li>
|
<li><router-link to="/logs" active-class="active"><fa :icon="faStream" fixed-width/>{{ $t('logs') }}</router-link></li>
|
||||||
<li @click="nav('db')" :class="{ active: page == 'db' }"><fa :icon="faDatabase" fixed-width/>{{ $t('db') }}</li>
|
<li><router-link to="/db" active-class="active"><fa :icon="faDatabase" fixed-width/>{{ $t('db') }}</router-link></li>
|
||||||
<li @click="nav('moderators')" :class="{ active: page == 'moderators' }"><fa :icon="faHeadset" fixed-width/>{{ $t('moderators') }}</li>
|
<li><router-link to="/moderators" active-class="active"><fa :icon="faHeadset" fixed-width/>{{ $t('moderators') }}</router-link></li>
|
||||||
<li @click="nav('users')" :class="{ active: page == 'users' }"><fa icon="users" fixed-width/>{{ $t('users') }}</li>
|
<li><router-link to="/users" active-class="active"><fa icon="users" fixed-width/>{{ $t('users') }}</router-link></li>
|
||||||
<li @click="nav('drive')" :class="{ active: page == 'drive' }"><fa icon="cloud" fixed-width/>{{ $t('@.drive') }}</li>
|
<li><router-link to="/drive" active-class="active"><fa icon="cloud" fixed-width/>{{ $t('@.drive') }}</router-link></li>
|
||||||
<li @click="nav('federation')" :class="{ active: page == 'federation' }"><fa :icon="faGlobe" fixed-width/>{{ $t('federation') }}</li>
|
<li><router-link to="/federation" active-class="active"><fa :icon="faGlobe" fixed-width/>{{ $t('federation') }}</router-link></li>
|
||||||
<li @click="nav('emoji')" :class="{ active: page == 'emoji' }"><fa :icon="faGrin" fixed-width/>{{ $t('emoji') }}</li>
|
<li><router-link to="/emoji" active-class="active"><fa :icon="faGrin" fixed-width/>{{ $t('emoji') }}</router-link></li>
|
||||||
<li @click="nav('announcements')" :class="{ active: page == 'announcements' }"><fa icon="broadcast-tower" fixed-width/>{{ $t('announcements') }}</li>
|
<li><router-link to="/announcements" active-class="active"><fa icon="broadcast-tower" fixed-width/>{{ $t('announcements') }}</router-link></li>
|
||||||
<li @click="nav('abuse')" :class="{ active: page == 'abuse' }"><fa :icon="faExclamationCircle" fixed-width/>{{ $t('abuse') }}</li>
|
<li><router-link to="/abuse" active-class="active"><fa :icon="faExclamationCircle" fixed-width/>{{ $t('abuse') }}</router-link></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="back-to-misskey">
|
<div class="back-to-misskey">
|
||||||
<a href="/"><fa :icon="faArrowLeft"/> {{ $t('back-to-misskey') }}</a>
|
<a href="/"><fa :icon="faArrowLeft"/> {{ $t('back-to-misskey') }}</a>
|
||||||
|
@ -102,7 +102,6 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: 'dashboard',
|
|
||||||
version,
|
version,
|
||||||
isMobile,
|
isMobile,
|
||||||
navOpend: !isMobile,
|
navOpend: !isMobile,
|
||||||
|
@ -116,9 +115,9 @@ export default Vue.extend({
|
||||||
faDatabase,
|
faDatabase,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
computed: {
|
||||||
nav(page: string) {
|
page() {
|
||||||
this.page = page;
|
return this.$route.params.page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -240,11 +239,10 @@ export default Vue.extend({
|
||||||
list-style none
|
list-style none
|
||||||
font-size 15px
|
font-size 15px
|
||||||
|
|
||||||
> li
|
> li > a
|
||||||
display block
|
display block
|
||||||
padding 10px 16px
|
padding 10px 16px
|
||||||
margin 0
|
margin 0
|
||||||
cursor pointer
|
|
||||||
user-select none
|
user-select none
|
||||||
color #eee
|
color #eee
|
||||||
transition margin-left 0.2s ease
|
transition margin-left 0.2s ease
|
||||||
|
|
Loading…
Reference in a new issue