diff --git a/src/components/Dashboard.svelte b/src/components/Dashboard.svelte index 02fb357a..abb4bf89 100644 --- a/src/components/Dashboard.svelte +++ b/src/components/Dashboard.svelte @@ -273,6 +273,7 @@ import store from "../store";
+
@@ -291,7 +292,6 @@ import store from "../store";
-
diff --git a/src/components/StatCards.svelte b/src/components/StatCards.svelte index b4dab96a..ba472f1d 100644 --- a/src/components/StatCards.svelte +++ b/src/components/StatCards.svelte @@ -1,96 +1,163 @@ -
-
-
-
-
-
- {$_('runners')} -
-
69
-
- - - -
-
+ +

Allgemeine Statistiken

+{#await stats_promise} + -
-
-
-
-
- {$_('total-scans')} +{:then stats} +
+
+
+
+
+
+ {$_('runners')} +
+
{stats.total_runners}
-
1500
-
-
-
-
-
-
-
-
-
- {$_('total-donations')} -
-
5000,00 €
-
- -
-
-
-
-
-
-
-
- {$_('total-distance')} -
-
100.0 km
+ + +
+
+
+
+
+
+
+
+ {$_('total-scans')} +
+
{stats.total_scans}
+
+
+
+
+
+
+
+
+
+ {$_('total-donations')} +
+
{stats.total_donation} €
+
+ +
+
+
+
+
+
+
+
+ {$_('total-distance')} +
+
+ {stats.total_distance / 1000} + km +
+
+ + +
+
+
+
+
+
+
+
+ {$_('count_teams')} +
+
{stats.total_teams}
+
+ + + + +
+
+
+
+
+
+
+
+ {$_('count_organizations')} +
+
{stats.total_orgs}
+
+ +
- -
-
+{:catch error} +
+ + {$_('general_promise_error')} + {error} + +
+{/await} diff --git a/src/components/Tracks.svelte b/src/components/Tracks.svelte index 030dc336..f90c9817 100644 --- a/src/components/Tracks.svelte +++ b/src/components/Tracks.svelte @@ -27,7 +27,7 @@ {:catch error}
- 😢 Error + {$_('general_promise_error')} {error}
diff --git a/src/locales/de.json b/src/locales/de.json index cc929e7d..2c009d52 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -37,5 +37,7 @@ "hallo": "hallo", "total-scans": "gesamte Scans", "total-donations": "Spendensumme", - "credits": "" + "credits": "", + "runners": "Läufer", + "total-distance": "gelaufene Strecke" } diff --git a/src/locales/en.json b/src/locales/en.json index e75866ed..a4d59e4e 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -48,5 +48,8 @@ "by": "by", "lfk-is-os": "The \"Lauf für Kaya!\" Frontend is (like all other projects for the \"LfK!\" Also) an open source project.", "oss_credit_description": "We use a lot of open source software on these projects, and would like to thank the following projects and contributors who help make open source great!", - "credits": "Credits" + "credits": "Credits", + "count_organizations": "# Organizations", + "count_teams": "# Teams", + "general_promise_error": "😢 Error" }