Apply the CREATE form's knobs to the photo in realtime
Every row now feeds the open render as it is typed, so a recipe's effect is visible before it is saved. The draft is not an undo step: SAVE/EXPORT stays the only thing that commits it, and merely opening the tab changes nothing.
This commit is contained in:
@@ -324,6 +324,13 @@ export function Workspace() {
|
||||
[user, applyRecipe, t]
|
||||
);
|
||||
|
||||
// CREATE edits the photo live: each knob lands on the render as it is typed so
|
||||
// the recipe can be judged before saving. No undo entry — this is a draft, and
|
||||
// SAVE/EXPORT is what commits it.
|
||||
const previewCreatedRecipe = useCallback((draft: Pick<Recipe, 'baseFilter' | 'adjustments'>) => {
|
||||
setRecipe((prev) => ({ ...prev, ...draft, isCustom: true }));
|
||||
}, []);
|
||||
|
||||
// The phone's encrypted .recipe envelope (`shared/utils/recipeShare` is the
|
||||
// app's own file, byte-identical). Signed in only — a guest's recipe is never
|
||||
// written to disk.
|
||||
@@ -781,6 +788,7 @@ export function Workspace() {
|
||||
currentBase={recipe.baseFilter}
|
||||
current={recipe.adjustments}
|
||||
signedIn={!!user}
|
||||
onPreview={previewCreatedRecipe}
|
||||
onSave={(draft) => void addCreatedRecipe(draft)}
|
||||
onExport={exportRecipeFile}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user