feat(wasm): web Save/Save As go through the dialog with a direct download
On the web, Save and Save As now open the in-app Save dialog (filename + format) like the desktop, and the unsaved-changes prompt's Save routes through it too — instead of an immediate rfd download. Confirm serializes to bytes and downloads directly via a Blob + hidden `<a download>` click (a user gesture), so there is no intermediate "click to download" link. Replaces the rfd-based download_web / WebSaveResult round-trip with a synchronous sys::download_bytes. Native save is unchanged. Native + web build; 75 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
93d136c5db
commit
fefae274d4
6 changed files with 99 additions and 107 deletions
|
|
@ -686,9 +686,6 @@ pub enum Message {
|
|||
FileOpened(Result<(String, PathBuf, CadDocument, crate::scene::DerivedCaches), String>),
|
||||
SaveFile,
|
||||
SaveAs,
|
||||
/// Result of the web (browser download) save: file name or error.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
WebSaveResult(Result<String, String>),
|
||||
// ── Custom Save-As dialog ─────────────────────────────────────────────
|
||||
SaveDialogFormatChanged(String),
|
||||
SaveDialogFilenameChanged(String),
|
||||
|
|
|
|||
Loading…
Reference in a new issue