fix(web): warn before losing unsaved changes

Closes #556
This commit is contained in:
Hakan Seven 2026-07-29 22:42:04 +03:00
commit 5f0e1732c1
4 changed files with 46 additions and 0 deletions

View file

@ -217,6 +217,8 @@ impl OpenCADStudio {
);
}
}
#[cfg(target_arch = "wasm32")]
crate::sys::set_unsaved_changes_warning(self.tabs.iter().any(|tab| tab.dirty));
task
}