From 93c976624176ee70f52956be238b604d36136cd4 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Wed, 25 Nov 2020 01:11:17 +0100 Subject: [PATCH] #101 stats - gui --- routes/admin.vue | 158 +++++++++++++++++++++++++++++++---------------- 1 file changed, 106 insertions(+), 52 deletions(-) diff --git a/routes/admin.vue b/routes/admin.vue index 69fe7aebb..18f66b2fc 100644 --- a/routes/admin.vue +++ b/routes/admin.vue @@ -6,56 +6,109 @@ admin.header - - +
+
+ + + Users + ({{stats.users.overall}}, {{stats.users.admins}} admins) + +
+
+ - -
+ + + + + + +
+
+ + {{locale.name}} + +
+
+

+ + Profiles +

+ {{locale.profiles}} +
+
+

+ + Pronouns +

+
    +
  • + {{pronoun}}: {{count}} +
  • +
+
+
+

+ + Dictionary +

+
    +
  • + Approved: {{locale.nouns.approved}} +
  • +
  • + Awaiting: {{locale.nouns.awaiting}} +
  • +
+
+
+
+
@@ -72,11 +125,12 @@ return {}; } - const users = await app.$axios.$get(`/admin/users`, { headers: { - authorization: 'Bearer ' + store.state.token, - } }); + const stats = await app.$axios.$get(`/admin/stats`); + + const users = await app.$axios.$get(`/admin/users`); return { + stats, users, }; },