From 43da06cf8e8a2343f063c9335d4b27cca59b7f92 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 26 Sep 2023 17:45:50 -0700 Subject: refator(anime): move upcoming to component --- src/lib/List/AnimeList.svelte | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'src/lib/List/AnimeList.svelte') 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} | - - {(anime.mediaListEntry || { progress: 0 }).progress}{@html totalEpisodes(anime)} - - updateMedia( - anime.id, - anime.mediaListEntry?.progress, - () => (animeLists = cleanCache(user, identity)) - )}>+ - {#if !title.includes('Completed')} - [{anime.nextAiringEpisode?.episode === -1 - ? '?' - : (anime.nextAiringEpisode?.episode || 1) - 1}] - {@html airingTime(anime)} + {#if title === 'Upcoming Episodes'} + + {(anime.mediaListEntry || { progress: 0 }).progress}{@html totalEpisodes(anime)} + + updateMedia( + anime.id, + anime.mediaListEntry?.progress, + () => (animeLists = cleanCache(user, identity)) + )}>+ + {#if !title.includes('Completed')} + [{anime.nextAiringEpisode?.episode === -1 + ? '?' + : (anime.nextAiringEpisode?.episode || 1) - 1}] + {@html airingTime(anime)} + {/if} + {:else} + {@html airingTime(anime, true)} {/if} {/each} -- cgit v1.2.3