diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/List/Anime/CleanAnimeList.svelte | 13 | ||||
| -rw-r--r-- | src/lib/List/Anime/DueAnimeList.svelte | 10 | ||||
| -rw-r--r-- | src/lib/List/Anime/UpcomingAnimeList.svelte | 6 | ||||
| -rw-r--r-- | src/lib/List/ListTitle.svelte | 6 | ||||
| -rw-r--r-- | src/lib/List/Manga/CleanMangaList.svelte | 25 | ||||
| -rw-r--r-- | src/lib/List/Manga/MangaListTemplate.svelte | 33 | ||||
| -rw-r--r-- | src/lib/Utility/executiveMode.ts | 51 |
7 files changed, 30 insertions, 114 deletions
diff --git a/src/lib/List/Anime/CleanAnimeList.svelte b/src/lib/List/Anime/CleanAnimeList.svelte index 93c8f208..808a8e5b 100644 --- a/src/lib/List/Anime/CleanAnimeList.svelte +++ b/src/lib/List/Anime/CleanAnimeList.svelte @@ -19,8 +19,6 @@ import stateBin from "$stores/stateBin"; import localforage from "localforage"; import MediaRoulette from "../MediaRoulette.svelte"; import type { Title } from "../mediaTitle"; -import aprilFools from "$stores/aprilFools"; -import { executiveCopy, executiveTitle } from "$lib/Utility/executiveMode"; export let media: Media[]; export let title: Title; @@ -224,7 +222,7 @@ const increment = (anime: Media, progress: number) => { count={$settings.displayTotalDueEpisodes || $settings.displayTotalEpisodes ? totalEpisodeDueCount : filteredMedia.length} - title={executiveTitle($aprilFools, title)} + {title} hideTime={dummy} hideCount={dummy} > @@ -232,17 +230,16 @@ const increment = (anime: Media, progress: number) => { <button class="small-button" onclick={() => (showRoulette = true)} - title={executiveCopy($aprilFools, "Roulette")} + title="Pick a random anime to watch" > - {executiveCopy($aprilFools, "Roulette")} + Roulette </button> {/if} </ListTitle> {#if media.length === 0} - {$aprilFools ? "No deliverables to display." : "No anime to display."} - <button onclick={() => (animeLists = cleanCache(user, $identity))}> - {executiveCopy($aprilFools, "Force refresh")} + No anime to display. <button onclick={() => (animeLists = cleanCache(user, $identity))}> + Force refresh </button> {:else if $settings.displayMediaListFilter && !disableFilter} <select value={selectedList} onchange={updateSelectedList}> diff --git a/src/lib/List/Anime/DueAnimeList.svelte b/src/lib/List/Anime/DueAnimeList.svelte index 8e6cb0ef..2c707ffb 100644 --- a/src/lib/List/Anime/DueAnimeList.svelte +++ b/src/lib/List/Anime/DueAnimeList.svelte @@ -14,8 +14,6 @@ import { hasNoAiredEpisodes, } from "$lib/Media/Anime/Airing/classify"; import { addNotification } from "$lib/Notification/store"; -import { executiveTitle } from "$lib/Utility/executiveMode"; -import aprilFools from "$stores/aprilFools"; import locale from "$stores/locale"; import identity from "$stores/identity"; @@ -155,10 +153,4 @@ const cleanMedia = ( }; </script> -<AnimeList - {endTime} - {cleanMedia} - bind:animeLists - {user} - title={executiveTitle($aprilFools, $locale().lists.due.episodes)} -/> +<AnimeList {endTime} {cleanMedia} bind:animeLists {user} title={$locale().lists.due.episodes} /> diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte index 6bee4955..d9b91122 100644 --- a/src/lib/List/Anime/UpcomingAnimeList.svelte +++ b/src/lib/List/Anime/UpcomingAnimeList.svelte @@ -12,8 +12,6 @@ import type { SubsPlease } from "$lib/Media/Anime/Airing/Subtitled/subsPlease"; import { addNotification } from "$lib/Notification/store"; import locale from "$stores/locale"; import identity from "$stores/identity"; -import aprilFools from "$stores/aprilFools"; -import { executiveTitle } from "$lib/Utility/executiveMode"; import { injectAiringTime } from "$lib/Media/Anime/Airing/Subtitled/match"; import { hasDueEpisodes, @@ -122,7 +120,7 @@ $: { {cleanMedia} bind:animeLists {user} - title={executiveTitle($aprilFools, $locale().lists.upcoming.episodes)} + title={$locale().lists.upcoming.episodes} upcoming /> @@ -134,7 +132,7 @@ $: { {cleanMedia} bind:animeLists {user} - title={executiveTitle($aprilFools, $locale().lists.upcoming.notYetReleased)} + title={$locale().lists.upcoming.notYetReleased} notYetReleased plannedOnly /> diff --git a/src/lib/List/ListTitle.svelte b/src/lib/List/ListTitle.svelte index 535d0807..d000e91f 100644 --- a/src/lib/List/ListTitle.svelte +++ b/src/lib/List/ListTitle.svelte @@ -1,7 +1,5 @@ <script lang="ts"> import tooltip from "$lib/Tooltip/tooltip"; -import { executiveCopy } from "$lib/Utility/executiveMode"; -import aprilFools from "$stores/aprilFools"; import type { Title } from "./mediaTitle"; export let time: number | undefined = undefined; @@ -16,9 +14,7 @@ export let hideCount = false; </script> <summary> - <span title={title.hint || undefined} use:tooltip - >{executiveCopy($aprilFools, title.title)}</span - > + <span title={title.hint || undefined} use:tooltip>{title.title}</span> {#if !hideCount}[{count === -1337 ? '...' : count}]{/if} <!-- {#if !hideCount}[{#if count === -1337}...{:else}<NumberTicker end={count} diff --git a/src/lib/List/Manga/CleanMangaList.svelte b/src/lib/List/Manga/CleanMangaList.svelte index aab8be97..56de1df1 100644 --- a/src/lib/List/Manga/CleanMangaList.svelte +++ b/src/lib/List/Manga/CleanMangaList.svelte @@ -22,14 +22,12 @@ 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"; @@ -124,30 +122,26 @@ const increment = (manga: Media) => { ? totalEpisodeDueCount : filteredMedia.length} time={endTime / 1000} - title={executiveTitle( - $aprilFools, - due - ? $locale().lists.due.mangaAndLightNovels - : $locale().lists.completed.mangaAndLightNovels, - )} + title={due + ? $locale().lists.due.mangaAndLightNovels + : $locale().lists.completed.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button class="small-button" - title={executiveCopy($aprilFools, "Force refresh")} + title="Force a full refresh" onclick={cleanCache} - data-umami-event="Force Refresh Manga" - >{executiveCopy($aprilFools, "Refresh")}</button + data-umami-event="Force Refresh Manga">Refresh</button > {#if $settings.displayMediaRoulette && filteredMedia.length > 0} <button class="small-button" onclick={() => (showRoulette = true)} - title={executiveCopy($aprilFools, "Pick a random manga to read")} + title="Pick a random manga to read" > - {executiveCopy($aprilFools, "Roulette")} + Roulette </button> {/if} {/if} @@ -183,9 +177,8 @@ const increment = (manga: Media) => { {/if} <p> - {$aprilFools ? "No deliverables to display." : "No manga to display."} - <button onclick={cleanCache} data-umami-event="Force Refresh No Manga" - >{executiveCopy($aprilFools, "Force refresh")}</button + No manga to display. <button onclick={cleanCache} data-umami-event="Force Refresh No Manga" + >Force refresh</button > </p> diff --git a/src/lib/List/Manga/MangaListTemplate.svelte b/src/lib/List/Manga/MangaListTemplate.svelte index daa3a27b..52649098 100644 --- a/src/lib/List/Manga/MangaListTemplate.svelte +++ b/src/lib/List/Manga/MangaListTemplate.svelte @@ -15,8 +15,6 @@ 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"; @@ -52,13 +50,6 @@ 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); @@ -375,26 +366,26 @@ const cleanCache = () => { <ListTitle count={0} time={endTime / 1000} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title={executiveCopy($aprilFools, "Force refresh")} + title="Force a full refresh" onclick={() => { cleanCache(); forceFlag = true; - }}>{executiveCopy($aprilFools, "Refresh")}</button + }}>Refresh</button > {/if} </ListTitle> {:else} <ListTitle {progress} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} /> @@ -424,26 +415,26 @@ const cleanCache = () => { <ListTitle count={0} time={endTime / 1000} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title={executiveCopy($aprilFools, "Force refresh")} + title="Force a full refresh" onclick={() => { cleanCache(); forceFlag = true; - }}>{executiveCopy($aprilFools, "Refresh")}</button + }}>Refresh</button > {/if} </ListTitle> {:else} <ListTitle {progress} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} /> @@ -456,19 +447,19 @@ const cleanCache = () => { <ListTitle count={cleanedMedia.length} time={endTime / 1000} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} > {#if !dummy} <button data-umami-event="Force Refresh Manga" - title={executiveCopy($aprilFools, "Force refresh")} + title="Force a full refresh" onclick={() => { cleanCache(); forceFlag = true; - }}>{executiveCopy($aprilFools, "Refresh")}</button + }}>Refresh</button > {/if} </ListTitle> @@ -493,7 +484,7 @@ const cleanCache = () => { <ListTitle count={-1337} time={0} - title={mangaListTitle()} + title={$locale().lists.due.mangaAndLightNovels} hideTime={dummy} hideCount={dummy} /> diff --git a/src/lib/Utility/executiveMode.ts b/src/lib/Utility/executiveMode.ts deleted file mode 100644 index c7b76b02..00000000 --- a/src/lib/Utility/executiveMode.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Title } from "$lib/List/mediaTitle"; - -const copyMap: Record<string, string> = { - Home: "Dashboard", - ホーム: "ダッシュボード", - Completed: "Archive", - 完結メディア: "アーカイブ", - Schedule: "Roadmap", - スケジュール: "ロードマップ", - 字幕放送スケジュール: "字幕ロードマップ", - Tools: "Utilities", - ツール: "ユーティリティ", - Settings: "Preferences", - 設定: "環境設定", - Profile: "Associate", - "Log in with AniList": "Authenticate with AniList", - AniListでログインする: "AniListで認証する", - "My Profile": "My Employee Profile", - バッジウォール: "表彰ウォール", - プロフィール: "社員プロフィール", - "My Badge Wall": "My Recognition Wall", - "Log out": "End Session", - ログアウト: "セッション終了", - "Due Episodes": "Action Items", - 追いつくべきエピソード: "対応項目", - "Upcoming Episodes": "Pipeline", - 今後のエピソード: "パイプライン", - "Not Yet Released": "Planned Deliverables", - 未公開: "計画中の成果物", - Anime: "Deliverables", - アニメ: "成果物", - "Manga & Light Novels": "Documentation Backlog", - "漫画&ライトノベル": "ドキュメントバックログ", - "New Releases": "New Deliverables", - 新着リリース: "新着成果物", - Refresh: "Quarterly Review", - Roulette: "Strategic Prioritisation", - "Refresh data": "Realign KPIs", - "Force refresh": "Force quarterly review", -}; - -export const executiveCopy = (enabled: boolean, text: string) => - enabled ? copyMap[text] || text : text; - -export const executiveTitle = (enabled: boolean, title: Title): Title => - enabled - ? { - ...title, - title: executiveCopy(enabled, title.title), - } - : title; |