web: mark the selected recipe in FAVORITED

The list was all one colour, so an open recipe was invisible in it. The entry
the stage is showing now reads accent (name, border and background, the same
`.chip.on` the rest of the app uses). The match is id AND name: a preset that
was merely filed under a new name shares the id but not the name, and must not
light up.
This commit is contained in:
2026-09-18 12:30:38 +07:00
parent f17cb08a63
commit cf4b01d4b3
+5 -1
View File
@@ -1165,7 +1165,11 @@ export function Workspace() {
: saved.map((entry) => ({
key: String(entry.id),
label: entry.name,
active: false,
// The look on the stage came from this entry: its name turns
// accent so the open recipe is visible in the list. A same-id
// preset that was merely filed under a new name must not light up,
// hence the name check too.
active: recipe.id === (entry.recipe as Recipe)?.id && recipe.name === entry.name,
onClick: () => applyRecipe({ ...(entry.recipe as Recipe), name: entry.name }),
}));
case 'light':