conditional devtools
This commit is contained in:
1 parent
09b1d379d7
commit
030f6d58fb
2 files changed
+7
-2
No files matched your search
@@ -20,7 +20,7 @@ serde = "1.0.136"
|
|||||||
serde_json = "1.0.79"
|
serde_json = "1.0.79"
|
||||||
thiserror = "1.0.30"
|
thiserror = "1.0.30"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
wry = { version = "0.16.0", features = ["devtools"] }
|
wry = { version = "0.16.0" }
|
||||||
futures-channel = "0.3.21"
|
futures-channel = "0.3.21"
|
||||||
tokio = { version = "1.16.1", features = [
|
tokio = { version = "1.16.1", features = [
|
||||||
"sync",
|
"sync",
|
||||||
|
|||||||
@@ -212,7 +212,12 @@ pub(super) fn handler(
|
|||||||
log::warn!("Open print modal failed: {e}");
|
log::warn!("Open print modal failed: {e}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DevTool => webview.open_devtools(),
|
DevTool => {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
webview.open_devtools();
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
log::warn!("Devtools are disabled in release builds");
|
||||||
|
}
|
||||||
|
|
||||||
Eval(code) => {
|
Eval(code) => {
|
||||||
if let Err(e) = webview.evaluate_script(code.as_str()) {
|
if let Err(e) = webview.evaluate_script(code.as_str()) {
|
||||||
|
|||||||
Reference in new issue
Block a user