From a101873eb0946b284a11a5081642711f5087da14 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 18 Feb 2023 16:24:02 +0100 Subject: [PATCH 1/3] Tailwind bump ref #148 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a8212d3..e5dbc21e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "svelte-i18n": "3.3.9", "svelte-preprocess": "4.7.0", "svelte-select": "3.17.0", - "tailwindcss": "3.2.4", + "tailwindcss": "3.2.7", "tinro": "0.6.1", "toastify-js": "1.10.0", "validator": "13.5.2", From eb1c17e3ac7e8f5e7310a90421fc9db3ed15c497 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 18 Feb 2023 16:24:13 +0100 Subject: [PATCH 2/3] Dasboard Cards redesign --- .../dashboard/MainDashContent.svelte | 149 +++++++++++++++- src/components/dashboard/StatCard.svelte | 22 +++ src/components/dashboard/StatCards.svelte | 165 ------------------ 3 files changed, 164 insertions(+), 172 deletions(-) create mode 100644 src/components/dashboard/StatCard.svelte delete mode 100644 src/components/dashboard/StatCards.svelte diff --git a/src/components/dashboard/MainDashContent.svelte b/src/components/dashboard/MainDashContent.svelte index b3d6f294..e7bb715e 100644 --- a/src/components/dashboard/MainDashContent.svelte +++ b/src/components/dashboard/MainDashContent.svelte @@ -1,22 +1,157 @@
{ navOpen = false; - }}> + }} +>

- {$_('dashboard-title')} + {$_("dashboard-title")} - - {$_('dashboard-greeting')}, - {store.state.jwtinfo.userdetails.firstname} {store.state.jwtinfo.userdetails.lastname} + {$_("dashboard-greeting")}, + {store.state.jwtinfo.userdetails.firstname} + {store.state.jwtinfo.userdetails.lastname}

- +

{$_("general-stats")}

+ {#await stats_promise} + + {:then stats} +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ {:catch error} +
+ + {$_("general_promise_error")} + {error} + +
+ {/await}
diff --git a/src/components/dashboard/StatCard.svelte b/src/components/dashboard/StatCard.svelte new file mode 100644 index 00000000..2079bfe1 --- /dev/null +++ b/src/components/dashboard/StatCard.svelte @@ -0,0 +1,22 @@ + + + +
+
+
+
+ {title} +
+
{value}
+
+ +
+
+
diff --git a/src/components/dashboard/StatCards.svelte b/src/components/dashboard/StatCards.svelte deleted file mode 100644 index 18d56adf..00000000 --- a/src/components/dashboard/StatCards.svelte +++ /dev/null @@ -1,165 +0,0 @@ - - - -

{$_('general-stats')}

-{#await stats_promise} - -{:then stats} -
- -
-
-
-
- {$_('runners')} -
-
{stats.total_runners}
-
- - -
-
-
-
-
-
-
-
- {$_('total-scans')} -
-
{stats.total_scans}
-
-
-
-
-
-
-
-
-
- {$_('total-donations')} -
-
{(stats.total_donation/100).toFixed(2)} €
-
- -
-
-
-
-
-
-
-
- {$_('total-distance')} -
-
- {stats.total_distance / 1000} - km -
-
- - -
-
-
- -
-
-
-
- {$_('count_teams')} -
-
{stats.total_teams}
-
- - - - -
-
-
- -
-
-
-
- {$_('count_organizations')} -
-
{stats.total_orgs}
-
- - -
-
-
-
-{:catch error} -
- - {$_('general_promise_error')} - {error} - -
-{/await} From 452d0101838d72bff7d588a953faae028e2ff819 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Sat, 18 Feb 2023 16:27:58 +0100 Subject: [PATCH 3/3] Updated breakpoints ref #148 --- src/components/dashboard/MainDashContent.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/MainDashContent.svelte b/src/components/dashboard/MainDashContent.svelte index e7bb715e..9381c01e 100644 --- a/src/components/dashboard/MainDashContent.svelte +++ b/src/components/dashboard/MainDashContent.svelte @@ -35,7 +35,7 @@

{$_("this-might-take-a-moment")}

{:then stats} -
+