From f24ee9edfdb28402e9829758a5196eeb514da67a Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sat, 14 Dec 2024 13:48:55 -0500 Subject: [PATCH] improved episode input in Anime Page --- frontend/src/helperComponents/Anime.svelte | 116 ++++++++++++++++----- 1 file changed, 89 insertions(+), 27 deletions(-) diff --git a/frontend/src/helperComponents/Anime.svelte b/frontend/src/helperComponents/Anime.svelte index 49b903e..20a0531 100644 --- a/frontend/src/helperComponents/Anime.svelte +++ b/frontend/src/helperComponents/Anime.svelte @@ -398,15 +398,19 @@ setTimeout(() => submitSuccess.set(false), 2000); }; - let max = 999 + let max = 999; if (currentAniListAnime.data.MediaList.media.episodes !== 0) { - max = currentAniListAnime.data.MediaList.media.episodes + max = currentAniListAnime.data.MediaList.media.episodes; + } + if ( + currentAniListAnime.data.MediaList.media.episodes === 0 && + currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode !== 0 + ) { + max = + currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode - + 1; } - if (currentAniListAnime.data.MediaList.media.episodes === 0 && - currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode !== 0) { - max = currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode - 1 - }
@@ -433,24 +437,81 @@ class="text-left block mb-2 text-sm font-medium text-white" >Episode Progress - +
+ + + +
/ {currentAniListAnime.data.MediaList.media .nextAiringEpisode.episode !== 0 @@ -459,9 +520,10 @@ : currentAniListAnime.data.MediaList.media.episodes}
{#if currentAniListAnime.data.MediaList.media.nextAiringEpisode.episode !== 0} -
- of {currentAniListAnime.data.MediaList.media.episodes} -
+
+ of {currentAniListAnime.data.MediaList.media + .episodes} +
{/if}