Add global undo for step deletion; simplify capture session UI
- The canvas Undo/Redo buttons now also undo/redo step deletion (single or multi-select), restoring the step's data, images, and position in the order. Backed by a new step:restore IPC call and GuideStore.restoreStep(). - Remove "Finish capture session" from the capture menu. The top-right recording bar in the guide editor is now the only place to start/stop recording, with its toggle relabeled "Start recording" / "Stop recording".
This commit is contained in:
@@ -419,6 +419,15 @@ function setupIpc() {
|
||||
reindex(guideId);
|
||||
return true;
|
||||
});
|
||||
h('step:restore', ({ guideId, step, originalBase64, workingBase64, position }) => {
|
||||
const images = {
|
||||
original: originalBase64 ? Buffer.from(originalBase64, 'base64') : null,
|
||||
working: workingBase64 ? Buffer.from(workingBase64, 'base64') : null,
|
||||
};
|
||||
const restored = store.restoreStep(guideId, step, images, position);
|
||||
reindex(guideId);
|
||||
return restored;
|
||||
});
|
||||
h('steps:reorder', ({ guideId, order }) => store.reorderSteps(guideId, order));
|
||||
h('step:imagePath', ({ guideId, stepId, which }) => {
|
||||
const p = store.stepImagePath(guideId, stepId, which || 'working');
|
||||
|
||||
Reference in New Issue
Block a user