diff options
| author | Fuwn <[email protected]> | 2026-04-01 11:02:59 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-01 11:02:59 +0000 |
| commit | 9c98a399632b5cbe4be11350d72b84cb8fcbace9 (patch) | |
| tree | 9278067a3f743a2c9504d80d1f277c1eb8d0a6df /src/lib/List/Manga | |
| parent | fix(badges): hide outbound link notice (diff) | |
| download | due.moe-9c98a399632b5cbe4be11350d72b84cb8fcbace9.tar.xz due.moe-9c98a399632b5cbe4be11350d72b84cb8fcbace9.zip | |
feat(ui): add april fools executive mode
Diffstat (limited to 'src/lib/List/Manga')
| -rw-r--r-- | src/lib/List/Manga/CleanMangaList.svelte | 25 | ||||
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 33 |
2 files changed, 37 insertions, 21 deletions
diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index 56de1df1..aab8be97 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -22,12 +22,14 @@ import settings from "$stores/settings"; import ListTitle from "../ListTitle.svelte"; import { onMount } from "svelte"; import root from "$lib/Utility/root"; +import { executiveCopy, executiveTitle } from "$lib/Utility/executiveMode"; import locale from "$stores/locale"; import Skeleton from "$lib/Loading/Skeleton.svelte"; import { browser } from "$app/environment"; import "../covers.css"; import CleanGrid from "../CleanGrid.svelte"; import CleanList from "../CleanList.svelte"; +import aprilFools from "$stores/aprilFools"; import stateBin from "$stores/stateBin"; import localforage from "localforage"; import MediaRoulette from "../MediaRoulette.svelte"; @@ -122,26 +124,30 @@ const increment = (manga: Media) => { ? totalEpisodeDueCount : filteredMedia.length} time={endTime / 1000} - title={due - ? $locale().lists.due.mangaAndLightNovels - : $locale().lists.completed.mangaAndLightNovels} + title={executiveTitle( + $aprilFools, + due + ? $locale().lists.due.mangaAndLightNovels + : $locale().lists.completed.mangaAndLightNovels, + )} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button class="small-button" - title="Force a full refresh" + title={executiveCopy($aprilFools, "Force refresh")} onclick={cleanCache} - data-umami-event="Force Refresh Manga">Refresh</button + data-umami-event="Force Refresh Manga" + >{executiveCopy($aprilFools, "Refresh")}</button > {#if $settings.displayMediaRoulette && filteredMedia.length > 0} <button class="small-button" onclick={() => (showRoulette = true)} - title="Pick a random manga to read" + title={executiveCopy($aprilFools, "Pick a random manga to read")} > - Roulette + {executiveCopy($aprilFools, "Roulette")} </button> {/if} {/if} @@ -177,8 +183,9 @@ const increment = (manga: Media) => { {/if} <p> - No manga to display. <button onclick={cleanCache} data-umami-event="Force Refresh No Manga" - >Force refresh</button + {$aprilFools ? "No deliverables to display." : "No manga to display."} + <button onclick={cleanCache} data-umami-event="Force Refresh No Manga" + >{executiveCopy($aprilFools, "Force refresh")}</button > </p> diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index 52649098..daa3a27b 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -15,6 +15,8 @@ import { chapterCount, hydrateChapterCounts } from "$lib/Media/Manga/chapters"; import { options } from "$lib/Notification/options"; import { addNotification } from "$lib/Notification/store"; import privilegedUser from "$lib/Utility/privilegedUser"; +import { executiveCopy, executiveTitle } from "$lib/Utility/executiveMode"; +import aprilFools from "$stores/aprilFools"; import identity from "$stores/identity"; import lastPruneTimes from "$stores/lastPruneTimes"; import locale from "$stores/locale"; @@ -50,6 +52,13 @@ let keyCacher: ReturnType<typeof setInterval> | undefined; let keyCacheMinutes = -1; let nativeEnhancementVersion = 0; let nativeEnhancementKey = ""; +const mangaListTitle = () => + executiveTitle( + $aprilFools, + due + ? $locale().lists.due.mangaAndLightNovels + : $locale().lists.completed.mangaAndLightNovels, + ); $: authorised = env.PUBLIC_ALWAYS_REFRESH_MANGA === "true" || privilegedUser($identity.id); @@ -366,26 +375,26 @@ const cleanCache = () => { <ListTitle count={0} time={endTime / 1000} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title="Force a full refresh" + title={executiveCopy($aprilFools, "Force refresh")} onclick={() => { cleanCache(); forceFlag = true; - }}>Refresh</button + }}>{executiveCopy($aprilFools, "Refresh")}</button > {/if} </ListTitle> {:else} <ListTitle {progress} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} /> @@ -415,26 +424,26 @@ const cleanCache = () => { <ListTitle count={0} time={endTime / 1000} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title="Force a full refresh" + title={executiveCopy($aprilFools, "Force refresh")} onclick={() => { cleanCache(); forceFlag = true; - }}>Refresh</button + }}>{executiveCopy($aprilFools, "Refresh")}</button > {/if} </ListTitle> {:else} <ListTitle {progress} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} /> @@ -447,19 +456,19 @@ const cleanCache = () => { <ListTitle count={cleanedMedia.length} time={endTime / 1000} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title="Force a full refresh" + title={executiveCopy($aprilFools, "Force refresh")} onclick={() => { cleanCache(); forceFlag = true; - }}>Refresh</button + }}>{executiveCopy($aprilFools, "Refresh")}</button > {/if} </ListTitle> @@ -484,7 +493,7 @@ const cleanCache = () => { <ListTitle count={-1337} time={0} - title={$locale().lists.due.mangaAndLightNovels} + title={mangaListTitle()} hideTime={dummy} hideCount={dummy} /> |