1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-27 21:18:27 +09:00
misskey/src/client/app/desktop/views/pages/admin/admin.dashboard.vue

63 lines
1.3 KiB
Vue
Raw Normal View History

2018-08-14 01:05:58 +09:00
<template>
2018-08-18 03:52:24 +09:00
<div class="obdskegsannmntldydackcpzezagxqfy">
<header>%i18n:@dashboard%</header>
<div v-if="stats" class="stats">
<div><b>%fa:user% {{ stats.originalUsersCount | number }}</b><span>%i18n:@original-users%</span></div>
<div><b>%fa:user% {{ stats.usersCount | number }}</b><span>%i18n:@all-users%</span></div>
<div><b>%fa:pen% {{ stats.originalNotesCount | number }}</b><span>%i18n:@original-notes%</span></div>
<div><b>%fa:pen% {{ stats.notesCount | number }}</b><span>%i18n:@all-notes%</span></div>
2018-08-14 16:53:57 +09:00
</div>
2018-08-17 19:17:23 +09:00
<div>
<button class="ui" @click="invite">%i18n:@invite%</button>
<p v-if="inviteCode">Code: <code>{{ inviteCode }}</code></p>
</div>
2018-08-14 01:05:58 +09:00
</div>
</template>
<script lang="ts">
import Vue from "vue";
export default Vue.extend({
data() {
return {
2018-08-17 19:17:23 +09:00
stats: null,
inviteCode: null
2018-08-14 01:05:58 +09:00
};
},
created() {
(this as any).api('stats').then(stats => {
this.stats = stats;
});
2018-08-17 19:17:23 +09:00
},
methods: {
invite() {
(this as any).api('admin/invite').then(x => {
this.inviteCode = x.code;
});
}
2018-08-14 01:05:58 +09:00
}
});
</script>
2018-08-14 04:30:42 +09:00
<style lang="stylus" scoped>
2018-08-18 03:52:24 +09:00
@import '~const.styl'
.obdskegsannmntldydackcpzezagxqfy
> .stats
display flex
justify-content center
margin-bottom 16px
> div
flex 1
text-align center
> b
display block
color $theme-color
> span
font-size 70%
2018-08-14 04:30:42 +09:00
</style>