aboutsummaryrefslogtreecommitdiff
path: root/src/lib/List/AnimeList.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-26 17:45:50 -0700
committerFuwn <[email protected]>2023-09-26 17:45:50 -0700
commit43da06cf8e8a2343f063c9335d4b27cca59b7f92 (patch)
treed526139fe7af67a6a3f09710f1177fd2bbc7e020 /src/lib/List/AnimeList.svelte
parentrefactor(anime): completed as component (diff)
downloaddue.moe-43da06cf8e8a2343f063c9335d4b27cca59b7f92.tar.xz
due.moe-43da06cf8e8a2343f063c9335d4b27cca59b7f92.zip
refator(anime): move upcoming to component
Diffstat (limited to 'src/lib/List/AnimeList.svelte')
-rw-r--r--src/lib/List/AnimeList.svelte36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/lib/List/AnimeList.svelte b/src/lib/List/AnimeList.svelte
index 03d58b1f..50fee05d 100644
--- a/src/lib/List/AnimeList.svelte
+++ b/src/lib/List/AnimeList.svelte
@@ -51,22 +51,26 @@
{anime.title.english || anime.title.romaji || anime.title.native}
</a>
<span style="opacity: 50%;">|</span>
- <!-- {anime.mediaListEntry?.progress || 0}{@html totalEpisodes(anime)} -->
- {(anime.mediaListEntry || { progress: 0 }).progress}{@html totalEpisodes(anime)}
- <a
- href={'#'}
- on:click={() =>
- updateMedia(
- anime.id,
- anime.mediaListEntry?.progress,
- () => (animeLists = cleanCache(user, identity))
- )}>+</a
- >
- {#if !title.includes('Completed')}
- [{anime.nextAiringEpisode?.episode === -1
- ? '?'
- : (anime.nextAiringEpisode?.episode || 1) - 1}]
- {@html airingTime(anime)}
+ {#if title === 'Upcoming Episodes'}
+ <!-- {anime.mediaListEntry?.progress || 0}{@html totalEpisodes(anime)} -->
+ {(anime.mediaListEntry || { progress: 0 }).progress}{@html totalEpisodes(anime)}
+ <a
+ href={'#'}
+ on:click={() =>
+ updateMedia(
+ anime.id,
+ anime.mediaListEntry?.progress,
+ () => (animeLists = cleanCache(user, identity))
+ )}>+</a
+ >
+ {#if !title.includes('Completed')}
+ [{anime.nextAiringEpisode?.episode === -1
+ ? '?'
+ : (anime.nextAiringEpisode?.episode || 1) - 1}]
+ {@html airingTime(anime)}
+ {/if}
+ {:else}
+ {@html airingTime(anime, true)}
{/if}
</li>
{/each}