🐛 更新逻辑复原下

This commit is contained in:
Tw93
2022-11-25 14:34:39 +08:00
parent 98133f8bff
commit 4bf9ffa12b

View File

@@ -164,23 +164,23 @@ fn main() -> wry::Result<()> {
#[cfg(target_os = "macos")]
let webview = WebViewBuilder::new(window)?
.with_user_agent(&user_agent_string)
// .with_accept_first_mouse(true)
.with_accept_first_mouse(true)
.with_url(&url.to_string())?
.with_devtools(cfg!(feature = "devtools"))
.with_initialization_script(include_str!("pake.js"))
.with_ipc_handler(handler)
// .with_back_forward_navigation_gestures(true)
.with_back_forward_navigation_gestures(true)
.build()?;
#[cfg(target_os = "windows")]
let webview = WebViewBuilder::new(window)?
.with_user_agent(&user_agent_string)
// .with_accept_first_mouse(true)
.with_accept_first_mouse(true)
.with_url(&url.to_string())?
.with_devtools(cfg!(feature = "devtools"))
.with_initialization_script(include_str!("pake.js"))
.with_ipc_handler(handler)
// .with_back_forward_navigation_gestures(true)
.with_back_forward_navigation_gestures(true)
.build()?;
// 自定义cookie文件夹仅用于Linux
// Custom Cookie folder, only for Linux
@@ -197,13 +197,13 @@ fn main() -> wry::Result<()> {
#[cfg(target_os = "linux")]
let webview = WebViewBuilder::new(window)?
.with_user_agent(&user_agent_string)
// .with_accept_first_mouse(true)
.with_accept_first_mouse(true)
.with_url(&url.to_string())?
.with_devtools(cfg!(feature = "devtools"))
.with_initialization_script(include_str!("pake.js"))
.with_ipc_handler(handler)
.with_web_context(&mut web_content)
// .with_back_forward_navigation_gestures(true)
.with_back_forward_navigation_gestures(true)
.build()?;
#[cfg(feature = "devtools")]