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

50 lines
1.0 KiB
Vue
Raw Normal View History

2018-08-14 01:05:58 +09:00
<template>
<div>
2018-08-14 04:30:42 +09:00
<h1>%i18n:@dashboard%</h1>
2018-08-14 16:53:57 +09:00
<div v-if="stats">
<p><b>%i18n:@all-users%</b>: <span>{{ stats.usersCount | number }}</span></p>
<p><b>%i18n:@original-users%</b>: <span>{{ stats.originalUsersCount | number }}</span></p>
<p><b>%i18n:@all-notes%</b>: <span>{{ stats.notesCount | number }}</span></p>
<p><b>%i18n:@original-notes%</b>: <span>{{ stats.originalNotesCount | number }}</span></p>
</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>
h1
margin 0 0 1em 0
padding 0 0 8px 0
font-size 1em
color #555
border-bottom solid 1px #eee
</style>