🐛 调整结构/升级wry支持手势/flomo地址替换

This commit is contained in:
Tw93
2022-12-07 22:48:34 +08:00
parent f641f1c2b3
commit a871267007
22 changed files with 85 additions and 188 deletions

142
src-tauri/Cargo.lock generated
View File

@@ -49,7 +49,7 @@ dependencies = [
"tauri-build",
"tauri-utils",
"webbrowser",
"wry 0.21.1",
"wry 0.23.1",
]
[[package]]
@@ -1262,20 +1262,6 @@ dependencies = [
"system-deps 5.0.0",
]
[[package]]
name = "jni"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec"
dependencies = [
"cesu8",
"combine",
"jni-sys",
"log",
"thiserror",
"walkdir",
]
[[package]]
name = "jni"
version = "0.20.0"
@@ -2474,52 +2460,6 @@ dependencies = [
"version-compare 0.1.1",
]
[[package]]
name = "tao"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43336f5d1793543ba96e2a1e75f3a5c7dcd592743be06a0ab3a190f4fcb4b934"
dependencies = [
"bitflags",
"cairo-rs",
"cc",
"cocoa",
"core-foundation",
"core-graphics",
"crossbeam-channel",
"dispatch",
"gdk",
"gdk-pixbuf",
"gdk-sys",
"gdkx11-sys",
"gio",
"glib",
"glib-sys",
"gtk",
"image",
"instant",
"jni 0.19.0",
"lazy_static",
"libc",
"log",
"ndk",
"ndk-context",
"ndk-sys",
"objc",
"once_cell",
"parking_lot",
"paste",
"png",
"raw-window-handle",
"scopeguard",
"serde",
"unicode-segmentation",
"uuid 1.2.2",
"windows 0.39.0",
"windows-implement",
"x11-dl",
]
[[package]]
name = "tao"
version = "0.15.6"
@@ -2544,7 +2484,7 @@ dependencies = [
"gtk",
"image",
"instant",
"jni 0.20.0",
"jni",
"lazy_static",
"libc",
"log",
@@ -3149,7 +3089,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0cc7962b5aaa0dfcebaeef0161eec6edf5f4606c12e6777fd7d392f52033a5"
dependencies = [
"jni 0.20.0",
"jni",
"ndk-context",
"objc",
"raw-window-handle",
@@ -3472,42 +3412,6 @@ dependencies = [
"toml",
]
[[package]]
name = "wry"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff5c1352b4266fdf92c63479d2f58ab4cd29dc4e78fbc1b62011ed1227926945"
dependencies = [
"base64",
"block",
"cocoa",
"core-graphics",
"crossbeam-channel",
"gdk",
"gio",
"glib",
"gtk",
"html5ever",
"http",
"kuchiki",
"libc",
"log",
"objc",
"objc_id",
"once_cell",
"serde",
"serde_json",
"sha2",
"tao 0.14.0",
"thiserror",
"url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
"windows 0.39.0",
"windows-implement",
]
[[package]]
name = "wry"
version = "0.22.5"
@@ -3536,7 +3440,45 @@ dependencies = [
"serde_json",
"sha2",
"soup2",
"tao 0.15.6",
"tao",
"thiserror",
"url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
"windows 0.39.0",
"windows-implement",
]
[[package]]
name = "wry"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a76c9236a810d4af02213f89f5bc55bf3262d40c4407b13a9fc847156ef8b856"
dependencies = [
"base64",
"block",
"cocoa",
"core-graphics",
"crossbeam-channel",
"dunce",
"gdk",
"gio",
"glib",
"gtk",
"html5ever",
"http",
"kuchiki",
"libc",
"log",
"objc",
"objc_id",
"once_cell",
"serde",
"serde_json",
"sha2",
"soup2",
"tao",
"thiserror",
"url",
"webkit2gtk",

View File

@@ -21,7 +21,7 @@ tauri = { version = "1.2.1", features = [] }
image = "0.24.5"
tauri-utils = "1.2.1"
webbrowser = "0.8.2"
wry = "0.21.1"
wry = "0.23.1"
[features]
# by default Tauri runs in production mode

View File

@@ -177,12 +177,11 @@ 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_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")]
@@ -193,7 +192,6 @@ fn main() -> wry::Result<()> {
.with_devtools(cfg!(feature = "devtools"))
.with_initialization_script(include_str!("pake.js"))
.with_ipc_handler(handler)
// .with_back_forward_navigation_gestures(true)
.build()?;
// 自定义cookie文件夹仅用于Linux
// Custom Cookie folder, only for Linux
@@ -211,13 +209,11 @@ 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_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)
.build()?;
#[cfg(feature = "devtools")]

View File

@@ -1,30 +0,0 @@
{
"package": {
"productName": "WeRead",
"version": "1.0.0"
},
"tauri": {
"windows": [
{
"url": "https://weread.qq.com/",
"transparent": true,
"fullscreen": false,
"width": 1200,
"height": 728,
"resizable": true
}
],
"security": {
"csp": null
},
"updater": {
"active": false
}
},
"build": {
"devPath": "../dist",
"distDir": "../dist",
"beforeBuildCommand": "",
"beforeDevCommand": ""
}
}