2018-08-13 18:05:58 +02:00
|
|
|
<template>
|
2018-08-13 21:30:42 +02:00
|
|
|
<div class="mk-admin">
|
2018-08-13 18:05:58 +02:00
|
|
|
<nav>
|
|
|
|
<ul>
|
2018-08-13 21:30:42 +02:00
|
|
|
<li @click="nav('dashboard')" :class="{ active: page == 'dashboard' }">%fa:chalkboard .fw%%i18n:@dashboard%</li>
|
2018-08-13 21:39:37 +02:00
|
|
|
<!-- <li @click="nav('users')" :class="{ active: page == 'users' }">%fa:users .fw%%i18n:@users%</li> -->
|
|
|
|
<!-- <li @click="nav('drive')" :class="{ active: page == 'drive' }">%fa:cloud .fw%%i18n:@drive%</li> -->
|
2018-08-13 21:30:42 +02:00
|
|
|
<!-- <li @click="nav('update')" :class="{ active: page == 'update' }">%i18n:@update%</li> -->
|
2018-08-13 18:05:58 +02:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<main>
|
|
|
|
<div v-if="page == 'dashboard'">
|
|
|
|
<x-dashboard/>
|
|
|
|
</div>
|
|
|
|
<div v-if="page == 'users'">
|
|
|
|
<x-suspend-user/>
|
|
|
|
</div>
|
2018-08-13 21:30:42 +02:00
|
|
|
<div v-if="page == 'drive'"></div>
|
2018-08-13 18:05:58 +02:00
|
|
|
<div v-if="page == 'update'"></div>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from "vue";
|
|
|
|
import XDashboard from "./admin.dashboard.vue";
|
|
|
|
import XSuspendUser from "./admin.suspend-user.vue";
|
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-08-13 18:24:46 +02:00
|
|
|
components: {
|
2018-08-13 18:05:58 +02:00
|
|
|
XDashboard,
|
2018-08-13 18:24:46 +02:00
|
|
|
XSuspendUser
|
2018-08-13 18:35:36 +02:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
page: 'dashboard'
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
nav(page: string) {
|
|
|
|
this.page = page;
|
|
|
|
}
|
2018-08-13 18:24:46 +02:00
|
|
|
}
|
2018-08-13 18:05:58 +02:00
|
|
|
});
|
|
|
|
</script>
|
2018-08-13 21:30:42 +02:00
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
@import '~const.styl'
|
|
|
|
|
|
|
|
.mk-admin
|
|
|
|
display flex
|
|
|
|
height 100%
|
|
|
|
margin 32px
|
|
|
|
|
|
|
|
> nav
|
|
|
|
flex 0 0 250px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
|
|
|
border-right solid 1px #ddd
|
|
|
|
|
|
|
|
> ul
|
|
|
|
list-style none
|
|
|
|
|
|
|
|
> li
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
|
|
|
color #666
|
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
color #555
|
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
|
|
|
color $theme-color !important
|
|
|
|
|
|
|
|
> main
|
|
|
|
width 100%
|
|
|
|
padding 16px 32px
|
|
|
|
|
|
|
|
</style>
|