diff --git a/src/components/AdjustmentPanel.tsx b/src/components/AdjustmentPanel.tsx index bbd8322..4c24e84 100644 --- a/src/components/AdjustmentPanel.tsx +++ b/src/components/AdjustmentPanel.tsx @@ -20,6 +20,7 @@ type TabId = 'recipes' | 'iq' | 'wb' | 'filters' | 'frame' | 'watermark'; // Choice-group keys that open a strip above the chip row: color chrome groups // (wb tab) and the D.RANGE selector (iq tab). type GroupKey = + | 'style' | 'cx' | 'cxb' | 'dr' @@ -243,8 +244,12 @@ export default function AdjustmentPanel({ const toggleGroup = (g: GroupKey) => { haptic(); const next = openGroup === g ? null : g; - // Opening an options strip closes any open slider row (single-row rule). - if (next) onOpenParamChange(null); + // Opening an options strip closes any open slider row and the expanded + // recipe strip (single-strip rule). + if (next) { + onOpenParamChange(null); + setShowRecipes(false); + } setOpenGroup(next); }; @@ -471,6 +476,23 @@ export default function AdjustmentPanel({ ], onPick: (v) => onUpdateCropRatio(v as CropRatio), }, + // PHOTO STYLE: the eight film simulations, collapsed into one strip chip. + // Its value is the applied sim's id — or '' when a saved recipe is active + // (then the chip reads as "not the startup sim" and glows amber). The label + // carries no value on purpose: the top bar already names the active look. + style: { + label: 'PHOTO STYLE', off: 'sim-provia', + value: FILM_SIMS.some((s) => s.id === currentRecipeId) ? currentRecipeId : '', + options: FILM_SIMS.map((s) => ({ v: s.id, d: s.name })), + onPick: (v) => { + const sim = FILM_SIMS.find((s) => s.id === v); + if (!sim) return; + // Same deliberate switch as the old inline chips: collapse the RECIPES + // strip so it never lingers over the freshly-applied sim. + setShowRecipes(false); + onSelectRecipe(filmSimToRecipe(sim)); + }, + }, gpsTime: { label: 'TIME', off: 'ON', value: gpsWm.showTime === false ? 'OFF' : 'ON', @@ -490,27 +512,20 @@ export default function AdjustmentPanel({ const chipsRow = (() => { switch (activeTab) { case 'recipes': { - // Main row: the six standard film simulations, then the RECIPES toggle - // (expands the user/bundled recipe strip above) and CREATE (quick-input - // modal). Recipes themselves are no longer inline chips here. + // Main row: PHOTO STYLE (the eight film simulations, in a strip of its + // own), then the RECIPES toggle (expands the user/bundled recipe strip + // above) and CREATE (quick-input modal). Recipes themselves are no + // longer inline chips here. const chips: ChipDef[] = [ - ...FILM_SIMS.map((s) => ({ - key: s.id, - label: s.name, - active: currentRecipeId === s.id, - // Choosing a simulation is a deliberate switch away from the saved - // recipes: collapse the RECIPES strip above so it never lingers - // over the freshly-applied sim. - onPress: () => { - setShowRecipes(false); - onSelectRecipe(filmSimToRecipe(s)); - }, - })), + groupChip('style'), { key: 'recipes-toggle', label: 'RECIPES', active: showRecipes, - onPress: () => setShowRecipes((v) => !v), + onPress: () => { + setOpenGroup(null); + setShowRecipes((v) => !v); + }, }, { key: 'create',