diff options
| author | Fuwn <[email protected]> | 2023-12-29 21:17:57 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-29 21:17:57 -0800 |
| commit | 2581ef653a0ab8f9583d3135c1a8f82775cb1e1b (patch) | |
| tree | cb230eb4bbd6d0da782f2241ccdaa2da8c3ea79f /src/lib/Tools | |
| parent | fix(wrapped): slice after sort (diff) | |
| download | due.moe-2581ef653a0ab8f9583d3135c1a8f82775cb1e1b.tar.xz due.moe-2581ef653a0ab8f9583d3135c1a8f82775cb1e1b.zip | |
feat(wrapped): genre tags sort options
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/Wrapped.svelte | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index 4f05626f..2ec74a42 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -5,7 +5,7 @@ type AniListAuthorisation } from '$lib/AniList/identity'; import { onMount } from 'svelte'; - import { tops, wrapped, type TopMedia } from '$lib/AniList/wrapped'; + import { tops, wrapped, type TopMedia, SortOptions } from '$lib/AniList/wrapped'; import { fullActivityHistory, activityHistory as getActivityHistory @@ -58,6 +58,7 @@ let topMedia: TopMedia; let highestRatedMediaPercentage = true; let highestRatedGenreTagPercentage = true; + let genreTagsSort = SortOptions.SCORE; $: { if (browser && mounted) { @@ -108,6 +109,7 @@ topMedia = tops( [...(animeList || []), ...(mangaList || [])], genreTagCount, + genreTagsSort, excludedKeywords ); @@ -686,6 +688,12 @@ <a href={'#'} on:click={pruneFullYear}>Refresh data</a> </SettingHint><br /> <p /> + <select bind:value={genreTagsSort}> + <option value={SortOptions.SCORE}>Score</option> + <option value={SortOptions.MINUTES_WATCHED}>Minutes Watched</option> + <option value={SortOptions.COUNT}>Count</option> + </select> + Genre and tag sort<br /> <input type="checkbox" bind:checked={includeMusic} /> Include music<br /> <input type="checkbox" bind:checked={includeRepeats} /> Include rewatches & rereads<br /> |