diff options
| author | Fuwn <[email protected]> | 2024-04-18 13:48:14 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-04-18 13:48:20 -0700 |
| commit | 3c740f9e327a2fff136967f8470eee5229295ee8 (patch) | |
| tree | 9b05aef8e51fa441db8160f171b16f37c0e27a01 /src/lib/List/Anime | |
| parent | fix(index): alignment on hide mix (diff) | |
| download | due.moe-3c740f9e327a2fff136967f8470eee5229295ee8.tar.xz due.moe-3c740f9e327a2fff136967f8470eee5229295ee8.zip | |
fix(list): tooltip wrap title
Diffstat (limited to 'src/lib/List/Anime')
| -rw-r--r-- | src/lib/List/Anime/CleanAnimeList.svelte | 90 |
1 files changed, 44 insertions, 46 deletions
diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte index 5f2281cf..2ee10f4b 100644 --- a/src/lib/List/Anime/CleanAnimeList.svelte +++ b/src/lib/List/Anime/CleanAnimeList.svelte @@ -179,55 +179,53 @@ <MediaTitle title={anime.title} /> </span> </a> - {#if $settings.displaySocialButton} - [<a href={`https://anilist.co/anime/${anime.id}/social`} target="_blank">S</a>] - {/if} - {#if !upcoming || notYetReleased || !$settings.displayCountdownRightAligned} - <span class="opaque">|</span> - {/if} - {#if !upcoming || notYetReleased} - <!-- {anime.mediaListEntry?.progress || 0}{@html totalEpisodes(anime)} --> - {pendingUpdate === anime.id ? progress + 1 : progress}{@html totalEpisodes(anime)} - <button - class={`button-square button-action ${ - pendingUpdate === anime.id ? 'opaque' : '' - }`} - style={pendingUpdate === anime.id ? 'pointer-events: none;' : ''} - on:click={() => { - if (pendingUpdate !== anime.id) { - lastUpdatedMedia = anime.id; - pendingUpdate = anime.id; - - incrementMediaProgress(anime.id, anime.mediaListEntry?.progress, user, () => { - const mediaListEntry = media.find((m) => m.id === anime.id)?.mediaListEntry; - - if (mediaListEntry) mediaListEntry.progress = progress + 1; - - previousAnimeList = media; - animeLists = cleanCache(user, $identity); - pendingUpdate = null; - }); - } - }}>+</button - > - {#if !completed} - [{anime.nextAiringEpisode?.episode === -1 - ? '?' - : (anime.nextAiringEpisode?.episode || 1) - - ((anime.nextAiringEpisode?.airingAt || 999) < - (anime.nextAiringEpisode?.nativeAiringAt || 0) - ? 2 - : 1)}] - <span class:countdown={$settings.displayCountdownRightAligned}> - <AiringTime originalAnime={anime} {subsPlease} /> - </span> - {/if} - {:else} + </Tooltip> + {#if $settings.displaySocialButton} + [<a href={`https://anilist.co/anime/${anime.id}/social`} target="_blank">S</a>] + {/if} + {#if !upcoming || notYetReleased || !$settings.displayCountdownRightAligned} + <span class="opaque">|</span> + {/if} + {#if !upcoming || notYetReleased} + <!-- {anime.mediaListEntry?.progress || 0}{@html totalEpisodes(anime)} --> + {pendingUpdate === anime.id ? progress + 1 : progress}{@html totalEpisodes(anime)} + <button + class={`button-square button-action ${pendingUpdate === anime.id ? 'opaque' : ''}`} + style={pendingUpdate === anime.id ? 'pointer-events: none;' : ''} + on:click={() => { + if (pendingUpdate !== anime.id) { + lastUpdatedMedia = anime.id; + pendingUpdate = anime.id; + + incrementMediaProgress(anime.id, anime.mediaListEntry?.progress, user, () => { + const mediaListEntry = media.find((m) => m.id === anime.id)?.mediaListEntry; + + if (mediaListEntry) mediaListEntry.progress = progress + 1; + + previousAnimeList = media; + animeLists = cleanCache(user, $identity); + pendingUpdate = null; + }); + } + }}>+</button + > + {#if !completed} + [{anime.nextAiringEpisode?.episode === -1 + ? '?' + : (anime.nextAiringEpisode?.episode || 1) - + ((anime.nextAiringEpisode?.airingAt || 999) < + (anime.nextAiringEpisode?.nativeAiringAt || 0) + ? 2 + : 1)}] <span class:countdown={$settings.displayCountdownRightAligned}> - <AiringTime originalAnime={anime} {subsPlease} upcoming={true} /> + <AiringTime originalAnime={anime} {subsPlease} /> </span> {/if} - </Tooltip> + {:else} + <span class:countdown={$settings.displayCountdownRightAligned}> + <AiringTime originalAnime={anime} {subsPlease} upcoming={true} /> + </span> + {/if} </span> </li> {/if} |