Löschen/Deaktivierung

This commit is contained in:
2026-02-01 02:00:11 +01:00
parent a72d50ced8
commit 2aebef3352
3 changed files with 40 additions and 5 deletions

View File

@@ -276,6 +276,13 @@ export function initEditor() {
async function confirmUnsavedChanges() {
const dirty = await hasUnsavedChanges();
if (!dirty) return 'ok';
try {
const currentSnapshot = await buildCurrentSnapshot();
if (currentSnapshot && savedSnapshot && currentSnapshot === savedSnapshot) {
clearDirty();
return 'ok';
}
} catch {}
const choice = await showUnsavedDialog();
if (choice === 'save') {
const okSave = await save();