fix(web): omit desktop exit guards from wasm
This commit is contained in:
parent
dd953287d6
commit
ec5ba7fcd6
@ -125,6 +125,7 @@ pub fn guard_window_close(app: &mut PhotocraftApp, ctx: &egui::Context) {
|
||||
if !ctx.input(|i| i.viewport().close_requested()) {
|
||||
return;
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
if crate::jiansun::guard_production_exit(app, ctx) {
|
||||
ctx.send_viewport_cmd(egui::ViewportCommand::CancelClose);
|
||||
return;
|
||||
|
||||
@ -45,6 +45,7 @@ pub fn invoke(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: Va
|
||||
{
|
||||
authorize(id, ¶ms)?;
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
if id == "file.exit" && crate::jiansun::guard_production_exit(app, ctx) {
|
||||
return Ok(Value::Null);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user