add total amount of users to stats

This commit is contained in:
2026-05-27 19:33:38 +02:00
parent 9f6215706d
commit 603b3f37b9
6 changed files with 11 additions and 0 deletions

View File

@@ -462,6 +462,7 @@
"stat_comments": "Gesamt Kommentare",
"stat_favs": "Gesamt Favoriten",
"stat_disk_usage": "Dateigröße Gesamt",
"stat_users": "Gesamt Benutzer",
"most_favorited": "Meiste Favs",
"favs": "Favs",
"top_xd": "Top xD-Score"

View File

@@ -466,6 +466,7 @@
"stat_comments": "Total Comments",
"stat_favs": "Total Favorites",
"stat_disk_usage": "Total File Size",
"stat_users": "Total Users",
"most_favorited": "Most Favorited",
"favs": "favs",
"top_xd": "Top xD Scores"

View File

@@ -462,6 +462,7 @@
"stat_comments": "Totaal aantal reacties",
"stat_favs": "Totaal aantal favorieten",
"stat_disk_usage": "Totale Bestandsgrootte",
"stat_users": "Totaal Gebruikers",
"most_favorited": "Meest Gefavoriet",
"favs": "favorieten",
"top_xd": "Top xD-scores"

View File

@@ -463,6 +463,7 @@
"stat_comments": "Gesamtanzahl Kommentare",
"stat_favs": "Gesamtanzahl Favoriten",
"stat_disk_usage": "Dateigröße Gesamt",
"stat_users": "Gesamt Benutzer",
"most_favorited": "Am häufigsten favorisiert",
"favs": "Favoriten",
"top_xd": "Beste xD-Punktestände"

View File

@@ -78,6 +78,11 @@ export default (router, tpl) => {
where items.active = true
`)[0].total;
const totalUsers = +(await db`
select count(*) as total
from "user"
`)[0].total;
const hoster = await db`
with t as (
select
@@ -135,6 +140,7 @@ export default (router, tpl) => {
xdtop,
totalComments,
totalFavs,
totalUsers,
enable_nsfl: config.enable_nsfl,
diskSize: cachedDiskSize,
tmp: null,

View File

@@ -73,6 +73,7 @@
<tbody>
<tr><td>{{ t('ranking.stat_total') }}</td><td>{{ stats.total }}</td></tr>
<tr><td>{{ t('ranking.stat_comments') }}</td><td>{{ totalComments }}</td></tr>
<tr><td>{{ t('ranking.stat_users') }}</td><td>{{ totalUsers }}</td></tr>
<tr><td>{{ t('ranking.stat_favs') }}</td><td>{{ totalFavs }}</td></tr>
<tr><td>{{ t('ranking.stat_tagged') }}</td><td>{{ stats.tagged }}</td></tr>
<tr><td>{{ t('ranking.stat_untagged') }}</td><td>{{ stats.untagged }}</td></tr>