From 925080f6a08a1f1515143db1bd6aef8109f5fb67 Mon Sep 17 00:00:00 2001
From: Zephyrrus <krisztian1997@gmail.com>
Date: Thu, 7 Jan 2021 23:55:37 +0200
Subject: chore: refactor stats generator to use an enum for types fix: saved
 data not being converted to JSON automatically when using SQLite (and
 possibly MSSQL) feat: display when a stat was generated in the section's
 header fix: not being able to click through the footer (sorry IE11 users, you
 still won't be able to click through it) fix: add is-mobile to columns so
 they don't stack on top of each other feat: add text next to the NSFW toggle
 and make it look like the elements around it (begone round iOS edges)

---
 src/site/pages/dashboard/admin/statistics.vue | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'src/site/pages/dashboard/admin/statistics.vue')

diff --git a/src/site/pages/dashboard/admin/statistics.vue b/src/site/pages/dashboard/admin/statistics.vue
index 4d601cf..ecee102 100644
--- a/src/site/pages/dashboard/admin/statistics.vue
+++ b/src/site/pages/dashboard/admin/statistics.vue
@@ -14,8 +14,11 @@
 						<div :key="category"
 							class="stats-container">
 							<h2 class="title">
-								{{ category }}
+								{{ category }} <span v-if="stats[category].meta" class="is-size-7 is-pulled-right is-family-monospace has-text-grey-light">
+									generated on {{ stats[category].meta.generatedOn }}
+								</span>
 							</h2>
+
 							<template v-for="item in Object.keys(stats[category])">
 								<!-- If it's plain text or a number, just print it -->
 								<template v-if="typeof stats[category][item] === 'string' || typeof stats[category][item] === 'number'">
@@ -25,7 +28,7 @@
 								</template>
 
 								<!-- If it's an object then we need to do some magic -->
-								<template v-else-if="typeof stats[category][item] === 'object'">
+								<template v-else-if="typeof stats[category][item] === 'object' && stats[category][item].type !== 'hidden'">
 									<byteUsage v-if="stats[category][item].type === 'byteUsage'"
 										:key="item"
 										:title="item"
-- 
cgit v1.2.3

