mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
(fix)(admin) correct stats format in ~/pages/admin/users.vue
This commit is contained in:
parent
9335a1bd48
commit
14d629bc26
@ -18,7 +18,7 @@
|
|||||||
<summary class="bg-light p-3">
|
<summary class="bg-light p-3">
|
||||||
<Icon v="users" />
|
<Icon v="users" />
|
||||||
Users
|
Users
|
||||||
({{ stats._.users }} overall, {{ stats._.admins }} admins)
|
({{ stats.overall.users }} overall, {{ stats.overall.admins }} admins)
|
||||||
</summary>
|
</summary>
|
||||||
<div v-if="showUsers" class="border-top">
|
<div v-if="showUsers" class="border-top">
|
||||||
<div class="input-group mt-4">
|
<div class="input-group mt-4">
|
||||||
@ -184,16 +184,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
profilesByLocale() {
|
profilesByLocale() {
|
||||||
const r = {};
|
return Object.fromEntries(Object.entries(this.stats.locales)
|
||||||
|
.map(([locale, localeStats]) => [locale, localeStats.users])
|
||||||
Object.entries(this.stats)
|
.sort(([_aLocale, aUsers], [_bLocale, bUsers]) => bUsers - aUsers));
|
||||||
.filter(([locale, _localeStats]) => locale !== '_' && locale !== 'calculatedAt')
|
|
||||||
.sort(([_aLocale, aLocaleStats], [_bLocale, bLocaleStats]) => bLocaleStats.users - aLocaleStats.users)
|
|
||||||
.forEach(([locale, localeStats]) => {
|
|
||||||
r[locale] = localeStats.users;
|
|
||||||
});
|
|
||||||
|
|
||||||
return r;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user