From e3f2c5691e98f45fbfde408b2b8c50af0b119a8d Mon Sep 17 00:00:00 2001 From: Valexr Date: Sun, 5 May 2024 19:20:54 +0200 Subject: [PATCH] add: luxon lib --- package.json | 4 ++ src/App.svelte | 62 +++++++++++++-------------- src/global.d.ts | 12 +++++- src/lib/counters.ts | 102 ++++++++++++++++++++++++++++++++++++-------- src/lib/utils.ts | 17 -------- 5 files changed, 129 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index c350eb6..3602331 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,13 @@ "url": "https://github.com/Valexr/county.git" }, "devDependencies": { + "@types/luxon": "^3.4.2", "@types/node": "^20.12.8", + "dayjs": "^1.11.11", "esbuild": "^0.20.2", "esbuild-svelte": "^0.8.0", + "luxon": "^3.4.4", + "moment": "^2.30.1", "svelte": "^4.2.15", "svelte-preprocess": "^5.1.4", "typescript": "^5.4.5" diff --git a/src/App.svelte b/src/App.svelte index af108fc..4a79e89 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -31,32 +31,30 @@ {name} -{#await images.load() then} - {#await quotes.load() then} -
- {#each $counters as counter, id} -
-
- -
- - {#key counter.quote} - - {/key} -
- {/each} -
- +{#await Promise.all([images.load(), quotes.load()]) then} +
+ {#each $counters as counter, id} +
+
+ +
+ + {#key counter.quote} + + {/key}
-
-
- {#if active} - - {:else} -

{$time}

- {/if} -
- {/await} + {/each} +
+ +
+
+ {/await}