2020-11-25 21:31:34 +09:00
|
|
|
<template>
|
|
|
|
<FormBase>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>ID</template>
|
2020-12-19 10:55:52 +09:00
|
|
|
<template #value><span class="_monospace">{{ $i.id }}</span></template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
|
|
|
|
<FormGroup>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.registeredDate }}</template>
|
2020-12-19 10:55:52 +09:00
|
|
|
<template #value><MkTime :time="$i.createdAt" mode="detail"/></template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
</FormGroup>
|
|
|
|
|
|
|
|
<FormGroup v-if="stats">
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #label>{{ $ts.statistics }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.notesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.notesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.repliesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.repliesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.renotesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.renotesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.repliedCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.repliedCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.renotedCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.renotedCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.pollVotesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.pollVotesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.pollVotedCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.pollVotedCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.sentReactionsCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.sentReactionsCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.receivedReactionsCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.receivedReactionsCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.noteFavoritesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.noteFavoritesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followingCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.followingCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followingCount }} ({{ $ts.local }})</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.localFollowingCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followingCount }} ({{ $ts.remote }})</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.remoteFollowingCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followersCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.followersCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followersCount }} ({{ $ts.local }})</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.localFollowersCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.followersCount }} ({{ $ts.remote }})</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.remoteFollowersCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.pageLikesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.pageLikesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.pageLikedCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.pageLikedCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.driveFilesCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.driveFilesCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.driveUsage }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ bytes(stats.driveUsage) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #key>{{ $ts.reversiCount }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<template #value>{{ number(stats.reversiCount) }}</template>
|
|
|
|
</FormKeyValueView>
|
|
|
|
</FormGroup>
|
|
|
|
|
|
|
|
<FormGroup>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #label>{{ $ts.other }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>emailVerified</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.emailVerified ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>twoFactorEnabled</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.twoFactorEnabled ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>securityKeys</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.securityKeys ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>usePasswordLessLogin</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.usePasswordLessLogin ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>isModerator</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.isModerator ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
<FormKeyValueView>
|
|
|
|
<template #key>isAdmin</template>
|
2020-12-26 10:47:36 +09:00
|
|
|
<template #value>{{ $i.isAdmin ? $ts.yes : $ts.no }}</template>
|
2020-11-25 21:31:34 +09:00
|
|
|
</FormKeyValueView>
|
|
|
|
</FormGroup>
|
|
|
|
</FormBase>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineAsyncComponent, defineComponent } from 'vue';
|
2021-11-12 02:02:25 +09:00
|
|
|
import FormSwitch from '@/components/form/switch.vue';
|
|
|
|
import FormSelect from '@/components/form/select.vue';
|
|
|
|
import FormLink from '@/components/debobigego/link.vue';
|
|
|
|
import FormBase from '@/components/debobigego/base.vue';
|
|
|
|
import FormGroup from '@/components/debobigego/group.vue';
|
|
|
|
import FormButton from '@/components/debobigego/button.vue';
|
|
|
|
import FormKeyValueView from '@/components/debobigego/key-value-view.vue';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import number from '@/filters/number';
|
|
|
|
import bytes from '@/filters/bytes';
|
|
|
|
import * as symbols from '@/symbols';
|
2020-11-25 21:31:34 +09:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
FormBase,
|
|
|
|
FormSelect,
|
|
|
|
FormSwitch,
|
|
|
|
FormButton,
|
|
|
|
FormLink,
|
|
|
|
FormGroup,
|
|
|
|
FormKeyValueView,
|
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['info'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-04-10 12:54:12 +09:00
|
|
|
[symbols.PAGE_INFO]: {
|
2020-12-26 10:47:36 +09:00
|
|
|
title: this.$ts.accountInfo,
|
2021-04-20 23:22:59 +09:00
|
|
|
icon: 'fas fa-info-circle'
|
2020-11-25 21:31:34 +09:00
|
|
|
},
|
|
|
|
stats: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
2021-04-10 12:54:12 +09:00
|
|
|
this.$emit('info', this[symbols.PAGE_INFO]);
|
2020-11-25 21:31:34 +09:00
|
|
|
|
|
|
|
os.api('users/stats', {
|
2020-12-19 10:55:52 +09:00
|
|
|
userId: this.$i.id
|
2020-11-25 21:31:34 +09:00
|
|
|
}).then(stats => {
|
|
|
|
this.stats = stats;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
number,
|
|
|
|
bytes,
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|