aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Tools
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-29 21:17:57 -0800
committerFuwn <[email protected]>2023-12-29 21:17:57 -0800
commit2581ef653a0ab8f9583d3135c1a8f82775cb1e1b (patch)
treecb230eb4bbd6d0da782f2241ccdaa2da8c3ea79f /src/lib/Tools
parentfix(wrapped): slice after sort (diff)
downloaddue.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.svelte10
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
/>