web: accent the brand and add the studio's quick gestures

- the brand "Cam", the avatar and the signed-in name follow the theme accent
- double-click a slider track resets that parameter; double-click the photo
  toggles 1:1 and the whole photo on the stage
- `*`, or a recipe chip dragged onto the star, files the look under FAVORITED
- RESET under CREATE clears the draft form, and the button now sits under a
  rule at the foot of the column
This commit is contained in:
2026-09-18 12:09:06 +07:00
parent 0f52572f20
commit 567f650bbb
6 changed files with 144 additions and 9 deletions
@@ -58,10 +58,14 @@ export function RecipeCreatePanel({
onPreview,
onSave,
onExport,
resetToken = 0,
}: {
currentBase?: BaseFilter;
current?: ColorAdjustments | null;
signedIn: boolean;
// Bumped by the RESET chip above the form: the draft drops back to the state
// the form opened with.
resetToken?: number;
onPreview: (draft: Pick<Recipe, 'baseFilter' | 'adjustments'>) => void;
onSave: (draft: RecipeDraft) => void;
onExport: (draft: RecipeDraft) => void;
@@ -155,6 +159,17 @@ export function RecipeCreatePanel({
return { name: name.trim() || 'NEW RECIPE', baseFilter: sim, adjustments, frameId: 'none', useGeotag: true };
};
// RESET clears the draft: back to the seed simulation, its standard values and
// an empty name. The form previews live, so the photo follows it home.
useEffect(() => {
if (resetToken === 0) return;
selectSim(seedBase);
setName('');
setWbRed(String(seedAdj.wbRed ?? 0));
setWbBlue(String(seedAdj.wbBlue ?? 0));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [resetToken]);
// Realtime: every knob applies to the photo on screen as it is typed, so the
// effect of the recipe is visible before saving it. Opening the tab is not an
// edit — the first run (the seeded values) is skipped.