feat(panel): RESET shows a star while the look differs from a clean start
This commit is contained in:
@@ -41,6 +41,9 @@ interface AdjustmentPanelProps {
|
||||
// RESET: the app's own defaults, from any tab — the startup look, every
|
||||
// parameter, the frame and the watermarks.
|
||||
onResetAll: () => void;
|
||||
// True while the look differs from a clean start: the RESET chip says so
|
||||
// ("RESET *", amber) instead of silently doing nothing visible.
|
||||
resetDirty: boolean;
|
||||
selectedFrame: FrameId;
|
||||
// FRAME tab CROP. Only meaningful on the library's plain frames (the camera
|
||||
// composes through its ratio band, polaroid/wall through their own window),
|
||||
@@ -179,6 +182,7 @@ export default function AdjustmentPanel({
|
||||
currentRecipeId,
|
||||
adjustments,
|
||||
onResetAll,
|
||||
resetDirty,
|
||||
selectedFrame,
|
||||
cropRatio,
|
||||
onUpdateCropRatio,
|
||||
@@ -327,8 +331,11 @@ export default function AdjustmentPanel({
|
||||
// one can sit off-screen just when it is wanted.
|
||||
const resetChip = (): ChipDef => ({
|
||||
key: 'reset-all',
|
||||
label: 'RESET',
|
||||
// Trailing star + amber text: there is a change to undo (the chip is
|
||||
// otherwise a plain neutral RESET that puts the code back to a clean start).
|
||||
label: resetDirty ? 'RESET *' : 'RESET',
|
||||
active: false,
|
||||
amberValue: resetDirty,
|
||||
onPress: onResetAll,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user