Merge pull request #395 from DioxusLabs/jk/update-tauri

feat: upgrade wry

Co-authored-by:  Ar37-rs<adyaro37@gmail.com>
This commit is contained in:
Jon Kelley 2022-05-05 16:33:07 -04:00 committed by GitHub
commit f2c48c5d90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 9 deletions

View file

@ -44,7 +44,6 @@ html = ["dioxus-html"]
ssr = ["dioxus-ssr"] ssr = ["dioxus-ssr"]
web = ["dioxus-web", "dioxus-router/web"] web = ["dioxus-web", "dioxus-router/web"]
desktop = ["dioxus-desktop"] desktop = ["dioxus-desktop"]
ayatana = ["dioxus-desktop/ayatana"]
router = ["dioxus-router"] router = ["dioxus-router"]
tui = ["dioxus-tui"] tui = ["dioxus-tui"]
liveview = ["dioxus-liveview"] liveview = ["dioxus-liveview"]

View file

@ -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.13.1" } 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",
@ -28,7 +28,7 @@ tokio = { version = "1.16.1", features = [
"rt", "rt",
"time", "time",
], optional = true, default-features = false } ], optional = true, default-features = false }
webbrowser = "0.6.0" webbrowser = "0.7.1"
mime_guess = "2.0.3" mime_guess = "2.0.3"
dunce = "1.0.2" dunce = "1.0.2"
@ -38,13 +38,9 @@ core-foundation = "0.9.3"
[features] [features]
default = ["tokio_runtime"] default = ["tokio_runtime"]
tokio_runtime = ["tokio"] tokio_runtime = ["tokio"]
devtool = ["wry/devtool"]
fullscreen = ["wry/fullscreen"] fullscreen = ["wry/fullscreen"]
transparent = ["wry/transparent"] transparent = ["wry/transparent"]
tray = ["wry/tray"] tray = ["wry/tray"]
ayatana = ["wry/ayatana"]
[dev-dependencies] [dev-dependencies]

View file

@ -191,7 +191,7 @@ pub(super) fn handler(
SetTitle(content) => window.set_title(&content), SetTitle(content) => window.set_title(&content),
SetDecorations(state) => window.set_decorations(state), SetDecorations(state) => window.set_decorations(state),
DevTool => webview.devtool(), DevTool => {}
Eval(code) => webview Eval(code) => webview
.evaluate_script(code.as_str()) .evaluate_script(code.as_str())

View file

@ -200,7 +200,7 @@ pub fn launch_with_props<P: 'static + Send>(
) )
} else { } else {
// in debug, we are okay with the reload menu showing and dev tool // in debug, we are okay with the reload menu showing and dev tool
webview = webview.with_dev_tool(true); webview = webview.with_devtools(true);
} }
desktop.webviews.insert(window_id, webview.build().unwrap()); desktop.webviews.insert(window_id, webview.build().unwrap());