feat(theme): R10 S1 — semantic status colors (danger/warn/success)

Add theme-scoped --danger/--warn/--success (+ -fg) tokens wired into the v4
@theme inline, replacing ~110 raw red/amber/emerald/green palette refs across
34 files. Fixes light-theme contrast failures (fixed Tailwind shades fell to
~1.7-3:1 on white). Status colors are scheme-independent — recognised by hue,
shifting only by theme to hold contrast (bright on dark bg, darkened on light).
Solid fills use the paired -fg text; @source inline guarantees the full -fg set
exists. IMDb rating gold kept as a deliberate decorative non-status exception.
This commit is contained in:
2026-08-09 01:03:53 +02:00
parent 9ca0c61ea9
commit d794524adf
35 changed files with 123 additions and 85 deletions
+8 -7
View File
@@ -431,9 +431,9 @@ export default function PlexBrowse() {
}
const PLAYABLE_TINT: Record<string, string> = {
direct: "bg-emerald-500",
remux: "bg-amber-500",
transcode: "bg-orange-600",
direct: "bg-success",
remux: "bg-warn",
transcode: "bg-warn",
};
function PlexPosterCard({
@@ -503,7 +503,7 @@ function PlexPosterCard({
className="absolute top-1.5 right-1.5 p-1 rounded-full bg-black/60 opacity-0 group-hover:opacity-100 hover:bg-black/80 transition"
>
<CheckCircle2
className={`w-4 h-4 ${card.status === "watched" ? "text-emerald-400" : "text-white"}`}
className={`w-4 h-4 ${card.status === "watched" ? "text-success" : "text-white"}`}
/>
</button>
)}
@@ -733,7 +733,7 @@ function SeasonCard({
}
className="absolute top-1.5 right-1.5 p-1 rounded-full bg-black/60 opacity-0 group-hover:opacity-100 hover:bg-black/80 transition"
>
<CheckCircle2 className={`w-4 h-4 ${watched ? "text-emerald-400" : "text-white"}`} />
<CheckCircle2 className={`w-4 h-4 ${watched ? "text-success" : "text-white"}`} />
</button>
)}
{/* Add whole season to a playlist, on hover. */}
@@ -920,7 +920,7 @@ function EpisodeCard({
className="absolute top-1.5 right-1.5 p-1 rounded-full bg-black/60 opacity-0 group-hover:opacity-100 hover:bg-black/80 transition"
>
<CheckCircle2
className={`w-4 h-4 ${ep.status === "watched" ? "text-emerald-400" : "text-white"}`}
className={`w-4 h-4 ${ep.status === "watched" ? "text-success" : "text-white"}`}
/>
</button>
)}
@@ -930,7 +930,7 @@ function EpisodeCard({
onToggleWatched ? "group-hover:opacity-0" : ""
}`}
>
<CheckCircle2 className="w-4 h-4 text-emerald-400" />
<CheckCircle2 className="w-4 h-4 text-success" />
</span>
)}
{pct > 0 && (
@@ -1099,6 +1099,7 @@ function PlexShowView({
}
className={`inline-flex items-center gap-1 ${onFilter ? "cursor-pointer hover:text-accent" : "cursor-default"}`}
>
{/* decorative rating gold — intentionally NOT a status token */}
· <Star className="w-3.5 h-3.5 text-amber-400" fill="currentColor" />
{show.imdb_rating}
</button>