mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
chore(deps): update wry (#1482)
This commit is contained in:
committed by
GitHub
parent
8572c6e407
commit
f2d24ef2fb
5
.changes/update-wry.md
Normal file
5
.changes/update-wry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Updated `wry`, fixing an issue with the draggable region.
|
||||
@@ -28,7 +28,7 @@ thiserror = "1.0.24"
|
||||
once_cell = "1.7.2"
|
||||
tauri-macros = { version = "1.0.0-beta-rc.0", path = "../tauri-macros" }
|
||||
tauri-utils = { version = "1.0.0-beta-rc.0", path = "../tauri-utils" }
|
||||
wry = "0.7"
|
||||
wry = "0.8"
|
||||
rand = "0.8"
|
||||
reqwest = { version = "0.11", features = [ "json", "multipart" ] }
|
||||
tempfile = "3"
|
||||
|
||||
@@ -273,7 +273,9 @@ impl Dispatch for WryDispatcher {
|
||||
.add_window_with_configs(
|
||||
attributes,
|
||||
rpc_handler,
|
||||
custom_protocol.map(create_custom_protocol),
|
||||
custom_protocol
|
||||
.map(create_custom_protocol)
|
||||
.unwrap_or_default(),
|
||||
file_drop_handler,
|
||||
)
|
||||
.map_err(|_| crate::Error::CreateWebview)?;
|
||||
@@ -480,7 +482,9 @@ impl Runtime for Wry {
|
||||
.add_window_with_configs(
|
||||
attributes,
|
||||
rpc_handler,
|
||||
custom_protocol.map(create_custom_protocol),
|
||||
custom_protocol
|
||||
.map(create_custom_protocol)
|
||||
.unwrap_or_default(),
|
||||
file_drop_handler,
|
||||
)
|
||||
.map_err(|_| crate::Error::CreateWebview)?;
|
||||
@@ -540,11 +544,11 @@ fn create_file_drop_handler<M: Params<Runtime = Wry>>(
|
||||
}
|
||||
|
||||
/// Create a wry custom protocol from a tauri custom protocol.
|
||||
fn create_custom_protocol(custom_protocol: CustomProtocol) -> wry::CustomProtocol {
|
||||
wry::CustomProtocol {
|
||||
fn create_custom_protocol(custom_protocol: CustomProtocol) -> Vec<wry::CustomProtocol> {
|
||||
vec![wry::CustomProtocol {
|
||||
name: custom_protocol.name.clone(),
|
||||
handler: Box::new(move |data| {
|
||||
(custom_protocol.handler)(data).map_err(|_| wry::Error::InitScriptError)
|
||||
}),
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user