diff --git a/public/index.html b/public/index.html
index 406bfc15e..2d8af6a38 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2345,6 +2345,20 @@
-
- estimated total
-
- time spent typing
-
-
-
highest wpm
-
@@ -2498,11 +2499,16 @@
-
tests started
+
+ tests started
+
-
-
tests completed
+
+ tests completed
+
+
-
diff --git a/public/js/account.js b/public/js/account.js
index c2c4ac35f..744a1df93 100644
--- a/public/js/account.js
+++ b/public/js/account.js
@@ -1344,11 +1344,26 @@ function loadMoreLines() {
}
}
+function refreshGlobalStats() {
+ let th = Math.floor(dbSnapshot.globalStats.time / 3600);
+ let tm = Math.floor((dbSnapshot.globalStats.time % 3600) / 60);
+ let ts = Math.floor((dbSnapshot.globalStats.time % 3600) % 60);
+ $(".pageAccount .globalTimeTyping .val").text(`
+
+ ${th < 10 ? "0" + th : th}:${tm < 10 ? "0" + tm : tm}:${
+ ts < 10 ? "0" + ts : ts
+ }
+ `);
+ $(".pageAccount .globalTestsStarted .val").text(dbSnapshot.globalStats.started);
+ $(".pageAccount .globalTestsCompleted .val").text(dbSnapshot.globalStats.completed);
+}
+
let totalSecondsFiltered = 0;
function refreshAccountPage() {
function cont() {
refreshThemeColorObject();
+ refreshGlobalStats();
let chartData = [];
visibleTableLines = 0;
@@ -1474,6 +1489,9 @@ function refreshAccountPage() {
//tag valid, check if filter is on
// if (activeFilters.includes("tag_" + tag)) tagHide = false;
if (config.resultFilters.tags[tag]) tagHide = false;
+ } else {
+ //tag not found in valid tags, meaning probably deleted
+ if (config.resultFilters.tags.none) tagHide = false;
}
});
}
diff --git a/public/js/db.js b/public/js/db.js
index 3fe4a2cb1..ccbb23e38 100644
--- a/public/js/db.js
+++ b/public/js/db.js
@@ -67,6 +67,11 @@ async function db_getUserSnapshot() {
snap.config = data.config;
snap.favouriteThemes =
data.favouriteThemes === undefined ? [] : data.favouriteThemes;
+ snap.globalStats = {
+ time: data.timeTyping,
+ started: data.startedTests,
+ completed: data.completedTests
+ }
} catch (e) {
//
}
@@ -93,6 +98,7 @@ async function db_getUserResults() {
return await db
.collection(`users/${user.uid}/results/`)
.orderBy("timestamp", "desc")
+ .limit(1000)
.get()
.then((data) => {
dbSnapshot.results = [];