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">
|
||||
<Icon v="users" />
|
||||
Users
|
||||
({{ stats._.users }} overall, {{ stats._.admins }} admins)
|
||||
({{ stats.overall.users }} overall, {{ stats.overall.admins }} admins)
|
||||
</summary>
|
||||
<div v-if="showUsers" class="border-top">
|
||||
<div class="input-group mt-4">
|
||||
@ -184,16 +184,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
profilesByLocale() {
|
||||
const r = {};
|
||||
|
||||
Object.entries(this.stats)
|
||||
.filter(([locale, _localeStats]) => locale !== '_' && locale !== 'calculatedAt')
|
||||
.sort(([_aLocale, aLocaleStats], [_bLocale, bLocaleStats]) => bLocaleStats.users - aLocaleStats.users)
|
||||
.forEach(([locale, localeStats]) => {
|
||||
r[locale] = localeStats.users;
|
||||
});
|
||||
|
||||
return r;
|
||||
return Object.fromEntries(Object.entries(this.stats.locales)
|
||||
.map(([locale, localeStats]) => [locale, localeStats.users])
|
||||
.sort(([_aLocale, aUsers], [_bLocale, bUsers]) => bUsers - aUsers));
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user