From aed022d05c120cc97a4c8fbc1d9074ab4a964688 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 16 Dec 2023 01:07:53 -0800 Subject: fix(anime): better alignment --- src/lib/List/Anime/CleanAnimeList.svelte | 107 ++++++++++++++++++------------- 1 file changed, 63 insertions(+), 44 deletions(-) (limited to 'src/lib/List/Anime') diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte index 2c7c7e26..0b130d15 100644 --- a/src/lib/List/Anime/CleanAnimeList.svelte +++ b/src/lib/List/Anime/CleanAnimeList.svelte @@ -56,55 +56,74 @@ {@const progress = (anime.mediaListEntry || { progress: 0 }).progress} {#if title.includes('Upcoming Episodes') || progress !== (anime.nextAiringEpisode?.episode || 9999) - 1} -
  • - - - - - - {#if $settings.displaySocialButton} - [S] - {/if} - {#if !$settings.displayCountdownRightAligned || title !== 'Upcoming Episodes'} - | - {/if} - {#if title !== 'Upcoming Episodes'} - - {pendingUpdate === anime.id ? progress + 1 : progress}{@html totalEpisodes(anime)} - { - if (pendingUpdate !== anime.id) { - lastUpdatedMedia = anime.id; - pendingUpdate = anime.id; +
  • + + + + + + + {#if $settings.displaySocialButton} + [S] + {/if} + {#if title !== 'Upcoming Episodes' || !$settings.displayCountdownRightAligned} + | + {/if} + {#if title !== 'Upcoming Episodes'} + + {pendingUpdate === anime.id ? progress + 1 : progress}{@html totalEpisodes(anime)} + { + if (pendingUpdate !== anime.id) { + lastUpdatedMedia = anime.id; + pendingUpdate = anime.id; - updateMedia(anime.id, anime.mediaListEntry?.progress, () => { - const mediaListEntry = media.find((m) => m.id === anime.id)?.mediaListEntry; + updateMedia(anime.id, anime.mediaListEntry?.progress, () => { + const mediaListEntry = media.find((m) => m.id === anime.id)?.mediaListEntry; - if (mediaListEntry) mediaListEntry.progress = progress + 1; + if (mediaListEntry) mediaListEntry.progress = progress + 1; - previousAnimeList = media; - animeLists = cleanCache(user, identity); - pendingUpdate = null; - }); - } - }}>+ - {#if !completed} - [{anime.nextAiringEpisode?.episode === -1 - ? '?' - : (anime.nextAiringEpisode?.episode || 1) - 1}] - {@html airingTime(anime)} + previousAnimeList = media; + animeLists = cleanCache(user, identity); + pendingUpdate = null; + }); + } + }}>+ + {#if !completed} + [{anime.nextAiringEpisode?.episode === -1 + ? '?' + : (anime.nextAiringEpisode?.episode || 1) - 1}] + + {@html airingTime(anime)} + + {/if} + {:else} + + {@html airingTime(anime, true)} + {/if} - {:else} - {@html airingTime(anime, true)} - {/if} +
  • {/if} {/each} + + -- cgit v1.2.3