diff options
| author | Fuwn <[email protected]> | 2024-08-23 14:52:02 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-08-23 14:52:02 -0700 |
| commit | 1250dbf21923ccf9b12d5cd334887b90c8c13096 (patch) | |
| tree | af2f4e207e4483e6495db31cc51fa2232564a2d3 | |
| parent | fix(SequelCatcher): tooltips (diff) | |
| download | due.moe-1250dbf21923ccf9b12d5cd334887b90c8c13096.tar.xz due.moe-1250dbf21923ccf9b12d5cd334887b90c8c13096.zip | |
feat(SequelCatcher): show current progress
| -rw-r--r-- | src/lib/Tools/SequelCatcher/List.svelte | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/Tools/SequelCatcher/List.svelte b/src/lib/Tools/SequelCatcher/List.svelte index 129cea5f..71513e76 100644 --- a/src/lib/Tools/SequelCatcher/List.svelte +++ b/src/lib/Tools/SequelCatcher/List.svelte @@ -8,13 +8,19 @@ let includeCurrent = false; - const matchCheck = (media: Media | undefined) => + const matchCheck = (media: Media | undefined, swap = false) => (media && media.mediaListEntry && media.mediaListEntry?.status !== 'CURRENT' && media.mediaListEntry?.status !== 'REPEATING' && media.mediaListEntry?.status !== 'PAUSED') || - !media; + !media + ? swap + ? undefined + : media + : swap + ? media + : undefined; </script> <input type="checkbox" bind:checked={includeCurrent} /> Include current (watching, rewatching, @@ -36,6 +42,11 @@ paused) <ol class="unwatched-relations-list"> {#each unwatchedRelations as relation} + {@const hit = matchCheck( + mediaListUnchecked.find((media) => media.id === relation.node.id), + true + )} + {#if matchCheck(mediaListUnchecked.find((media) => media.id === relation.node.id)) || includeCurrent} <li> <a @@ -45,6 +56,12 @@ paused) <MediaTitleDisplay title={relation.node.title} /> </a> + {#if hit && hit.mediaListEntry && hit.mediaListEntry.progress > 0} + <span class="opaque">|</span> + + {hit.mediaListEntry.progress}/{#if hit.episodes}{hit.episodes}{:else}?{/if} + {/if} + <span class="opaque"> ({relation.node.startDate.year}) </span> |