mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
#101 stats - gui
This commit is contained in:
parent
073612a10f
commit
93c9766241
@ -6,7 +6,15 @@
|
|||||||
<T>admin.header</T>
|
<T>admin.header</T>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<Table :data="Object.values(users)" :columns="4" count>
|
<section>
|
||||||
|
<details class="border mb-3">
|
||||||
|
<summary class="bg-light p-3">
|
||||||
|
<Icon v="users"/>
|
||||||
|
Users
|
||||||
|
({{stats.users.overall}}, {{stats.users.admins}} admins)
|
||||||
|
</summary>
|
||||||
|
<div class="border-top">
|
||||||
|
<Table :data="Object.values(users)" :columns="4">
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
<th class="text-nowrap">
|
<th class="text-nowrap">
|
||||||
<T>admin.user.user</T>
|
<T>admin.user.user</T>
|
||||||
@ -57,6 +65,51 @@
|
|||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section v-for="(locale, k) in stats.locales" :key="k">
|
||||||
|
<details class="border mb-3" open>
|
||||||
|
<summary class="bg-light p-3">
|
||||||
|
<LocaleLink :locale="k" link="/">{{locale.name}}</LocaleLink>
|
||||||
|
</summary>
|
||||||
|
<div class="p-3 border-top d-flex justify-content-between flex-column flex-md-row">
|
||||||
|
<div class="flex-grow-1">
|
||||||
|
<h4 class="h5">
|
||||||
|
<Icon v="id-card"/>
|
||||||
|
Profiles
|
||||||
|
</h4>
|
||||||
|
{{locale.profiles}}
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1">
|
||||||
|
<h4 class="h5">
|
||||||
|
<Icon v="tags"/>
|
||||||
|
Pronouns
|
||||||
|
</h4>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li v-for="(count, pronoun) in locale.pronouns" v-if="count >= 10">
|
||||||
|
<strong>{{pronoun}}</strong>: {{count}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1">
|
||||||
|
<h4 class="h5">
|
||||||
|
<Icon v="atom-alt"/>
|
||||||
|
Dictionary
|
||||||
|
</h4>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li>
|
||||||
|
<strong>Approved</strong>: {{locale.nouns.approved}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>Awaiting</strong>: {{locale.nouns.awaiting}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -72,11 +125,12 @@
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const users = await app.$axios.$get(`/admin/users`, { headers: {
|
const stats = await app.$axios.$get(`/admin/stats`);
|
||||||
authorization: 'Bearer ' + store.state.token,
|
|
||||||
} });
|
const users = await app.$axios.$get(`/admin/users`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
stats,
|
||||||
users,
|
users,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user