diff --git a/src/web/screens/detail/ThemePicker.tsx b/src/web/screens/detail/ThemePicker.tsx
index ea02957..ba86a35 100644
--- a/src/web/screens/detail/ThemePicker.tsx
+++ b/src/web/screens/detail/ThemePicker.tsx
@@ -1,5 +1,5 @@
import { useEffect, useLayoutEffect, useRef, useState, type KeyboardEvent, type ReactNode } from "react";
-import { Check, ExternalLink, X } from "lucide-react";
+import { Check, ChevronDown, ExternalLink, X } from "lucide-react";
import type { SavedPalette } from "../../../shared/api-types.js";
import type { Theme } from "../../../shared/validation.js";
import { api, errorMessage, useApi } from "../../api.js";
@@ -26,6 +26,8 @@ const PRESETS: { name: string; theme: Theme }[] = [
const paletteKey = (colors: string[]) => colors.join("-").toLowerCase();
+const paletteLabel = (p: SavedPalette) => `Imported ${new Date(p.createdAt).toLocaleDateString(undefined, { month: "short", day: "numeric" })}`;
+
const cardClass = (selected: boolean) =>
cx(
"relative overflow-hidden rounded-xl border transition",
@@ -59,41 +61,33 @@ function PresetCard({ name, theme, selected, onClick }: { name: string; theme: T
);
}
-// Miniature of a link page (background, a text line and a button) that applies one version of a palette.
-function VariantThumb({ theme, label, selected, onClick }: { theme: Theme; label: string; selected: boolean; onClick: () => void }) {
+// Miniature of a link page: background, a line of text and a button.
+function ThemeThumb({ theme }: { theme: Theme }) {
return (
-
+
+
+
);
}
-// A palette: each color opens the role menu, the two thumbnails apply a dark or light version of it.
+// A palette card: each color opens the role menu, the name row opens the dark/light menu.
function PaletteCard({
colors,
label,
selected,
- onApply,
+ onOpenVariants,
onPickColor,
onRemove,
}: {
colors: string[];
label: string;
selected: Variant | null;
- onApply: (variant: Variant) => void;
+ onOpenVariants: (anchor: HTMLElement) => void;
onPickColor: (color: string, anchor: HTMLElement) => void;
onRemove?: () => void;
}) {
@@ -113,24 +107,28 @@ function PaletteCard({
/>
))}
-