diff --git a/src/lib/components/media/ComingSoon.svelte b/src/lib/components/media/ComingSoon.svelte index 2f6c72a..c300a49 100644 --- a/src/lib/components/media/ComingSoon.svelte +++ b/src/lib/components/media/ComingSoon.svelte @@ -4,6 +4,7 @@ import PosterGrid from './PosterGrid.svelte'; import WatchlistCard from './WatchlistCard.svelte'; import { groupByUpcomingWindow } from '$lib/domain/upcoming'; + import { releaseVerb } from '$lib/domain/release'; import type { WatchlistItem } from '$lib/server/db/schema'; /** @@ -80,7 +81,14 @@ {#if upcoming.kind === 'season'} Season {upcoming.seasonNumber} {:else} - Premieres + + {releaseVerb(item.mediaType)} {/if} · {upcoming.date ? upcoming.fullDate : 'date not announced'}
diff --git a/src/lib/components/media/WatchlistCard.svelte b/src/lib/components/media/WatchlistCard.svelte index 749a84a..48773dc 100644 --- a/src/lib/components/media/WatchlistCard.svelte +++ b/src/lib/components/media/WatchlistCard.svelte @@ -6,7 +6,7 @@ import SeasonTracker from './SeasonTracker.svelte'; import { getSeasonProgress } from '$lib/domain/progress'; import { progressNote } from '$lib/domain/episodes'; - import { getReleaseInfo } from '$lib/domain/release'; + import { canMarkWatched, getReleaseInfo, pendingReleaseLabel } from '$lib/domain/release'; import { daysUntilDeletion, shouldWarnAboutDeletion, @@ -58,8 +58,27 @@ const progress = $derived(getSeasonProgress(item)); - // "Mark as watched" still works on an unreleased title (premieres exist), but - // it shouldn't be the loudest thing on a card for something that isn't out. + /** + * What replaces the "Watched" button on a title that is not out yet, or null + * when there is nothing to wait for. + * + * The button used to sit here, quieter but still pressable, which meant a film + * opening next spring could be filed as seen. Naming the date instead is not + * only a refusal — it is the answer to the question the button was standing in + * front of. `canMarkWatched` holds the rule and the reason it stops at + * confirmed dates. + * + * Only ever shown for a title that is *not* already marked watched. A row that + * predates this rule keeps its way back out; the rule governs the way in. + */ + const pendingRelease = $derived( + !item.watched && !canMarkWatched(item.releaseDate) + ? pendingReleaseLabel(item.mediaType, item.releaseDate) + : null + ); + + // A title with no date at all is still tickable — see `canMarkWatched` — but + // it should not wear the loudest button on the card either. const unreleased = $derived(getReleaseInfo(item.releaseDate).state !== 'released'); /** @@ -120,21 +139,51 @@ {:else}