From 2baec7d75723c369b0be72cb4383fe73908b3945 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 24 Apr 2026 22:36:54 +0200 Subject: [PATCH] feat: stats page redesign --- src/lib/components/app/auth-dialog.svelte | 17 +- src/lib/components/app/stats.svelte | 183 ++++++++++++--------- src/lib/components/ui/window/window.svelte | 14 +- 3 files changed, 125 insertions(+), 89 deletions(-) diff --git a/src/lib/components/app/auth-dialog.svelte b/src/lib/components/app/auth-dialog.svelte index 1fae4ce..02dae5d 100644 --- a/src/lib/components/app/auth-dialog.svelte +++ b/src/lib/components/app/auth-dialog.svelte @@ -241,7 +241,10 @@ - + {user ? 'Account Settings' : 'Welcome Back'} @@ -332,8 +335,8 @@
- -

No passkeys added yet

+ +

No passkeys added yet

{/each} @@ -350,7 +353,11 @@ class="!h-10" /> - + + -
- {#each stats.topStations as station} -
- {stationName(station.stationId)} - {formatDuration(station.seconds)} +
+ {#if activeTab === 'stations'} + {#each stats.topStations as station, i} +
+ {i + 1} +
+
+ + {stationName(station.stationId)} + + + {formatDuration(station.seconds)} + +
+
+
+
+
{:else} -

- Station stats will appear after you listen for a bit. -

+
+

Station stats will appear after you listen for a bit.

+
{/each} -
- + {:else} + {#each stats.topSongs as song, i} +
+ {i + 1} + {#if song.image} + + {:else} +
+ {/if} +
+
+ + {song.title ?? song.fileId} + + + {formatDuration(song.seconds)} + +
+
+
+
+
+
+ {:else} +
+

No top songs yet.

+
+ {/each} + {/if} +
{/if}
diff --git a/src/lib/components/ui/window/window.svelte b/src/lib/components/ui/window/window.svelte index 7046a62..664c7a3 100644 --- a/src/lib/components/ui/window/window.svelte +++ b/src/lib/components/ui/window/window.svelte @@ -112,8 +112,8 @@ {#if show} {/if} - -{/if} \ No newline at end of file +{/if}