diff options
| author | Fuwn <[email protected]> | 2023-12-29 21:22:21 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-29 21:22:21 -0800 |
| commit | 482ae3c17d883ec0b46c92fb9a8918b48e369edb (patch) | |
| tree | 1aa0ee4249d7dfb99001399c486d19fd37f20c33 /src/lib/Tools | |
| parent | feat(wrapped): genre tags sort options (diff) | |
| download | due.moe-482ae3c17d883ec0b46c92fb9a8918b48e369edb.tar.xz due.moe-482ae3c17d883ec0b46c92fb9a8918b48e369edb.zip | |
feat(wrapped): update title on sort change
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/Wrapped.svelte | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index 2ec74a42..6f64c9d5 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -127,6 +127,16 @@ updateWidth(); } + $: genreTagTitle = (() => { + switch (genreTagsSort) { + case SortOptions.SCORE: + return 'Highest Rated'; + case SortOptions.MINUTES_WATCHED: + return 'Most Watched'; + case SortOptions.COUNT: + return 'Most Common'; + } + })(); const updateWidth = () => { const wrappedContainer = document.querySelector('#wrapped') as HTMLElement; @@ -556,7 +566,7 @@ /> </a> <div> - <b>Highest Rated Genres</b> + <b>{genreTagTitle} Genres</b> <ol> {#each topMedia.genres as genre} <li> @@ -592,7 +602,7 @@ /> </a> <div> - <b>Highest Rated Tags</b> + <b>{genreTagTitle} Tags</b> <ol> {#each topMedia.tags as tag} <li> |