🐛 更新代码逻辑版本
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^1.2.0",
|
||||
"@tauri-apps/cli": "^1.2.0",
|
||||
"@tauri-apps/cli": "^1.2.1",
|
||||
"axios": "^1.1.3",
|
||||
"commander": "^9.4.1",
|
||||
"file-type": "^18.0.0",
|
||||
|
||||
119
src-tauri/Cargo.lock
generated
119
src-tauri/Cargo.lock
generated
@@ -8,12 +8,6 @@ version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "adler32"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.20"
|
||||
@@ -531,16 +525,6 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deflate"
|
||||
version = "0.7.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4"
|
||||
dependencies = [
|
||||
"adler32",
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "0.99.17"
|
||||
@@ -643,7 +627,7 @@ dependencies = [
|
||||
"flume",
|
||||
"half",
|
||||
"lebe",
|
||||
"miniz_oxide 0.6.2",
|
||||
"miniz_oxide",
|
||||
"smallvec",
|
||||
"threadpool",
|
||||
]
|
||||
@@ -681,12 +665,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.0.24"
|
||||
version = "1.0.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
|
||||
checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"miniz_oxide 0.5.4",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1181,12 +1165,12 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
|
||||
|
||||
[[package]]
|
||||
name = "ico"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a4b3331534254a9b64095ae60d3dc2a8225a7a70229cd5888be127cdc1f6804"
|
||||
checksum = "031530fe562d8c8d71c0635013d6d155bbfe8ba0aa4b4d2d24ce8af6b71047bd"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"png 0.11.0",
|
||||
"png",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1237,7 +1221,7 @@ dependencies = [
|
||||
"jpeg-decoder",
|
||||
"num-rational",
|
||||
"num-traits",
|
||||
"png 0.17.7",
|
||||
"png",
|
||||
"scoped_threadpool",
|
||||
"tiff",
|
||||
]
|
||||
@@ -1261,15 +1245,6 @@ dependencies = [
|
||||
"cfb",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inflate"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f5f9f47468e9a76a6452271efadc88fe865a82be91fe75e6c0c57b87ccea59d4"
|
||||
dependencies = [
|
||||
"adler32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.12"
|
||||
@@ -1526,15 +1501,6 @@ dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34"
|
||||
dependencies = [
|
||||
"adler",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.6.2"
|
||||
@@ -1642,17 +1608,6 @@ dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-iter"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-rational"
|
||||
version = "0.4.1"
|
||||
@@ -1899,9 +1854,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
||||
|
||||
[[package]]
|
||||
name = "pest"
|
||||
version = "2.4.1"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8"
|
||||
checksum = "5f400b0f7905bf702f9f3dc3df5a121b16c54e9e8012c082905fdf09a931861a"
|
||||
dependencies = [
|
||||
"thiserror",
|
||||
"ucd-trie",
|
||||
@@ -2057,18 +2012,6 @@ dependencies = [
|
||||
"xml-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0b0cabbbd20c2d7f06dbf015e06aad59b6ca3d9ed14848783e98af9aaf19925"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"deflate",
|
||||
"inflate",
|
||||
"num-iter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.17.7"
|
||||
@@ -2078,7 +2021,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
"miniz_oxide 0.6.2",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2832,7 +2775,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
"paste",
|
||||
"png 0.17.7",
|
||||
"png",
|
||||
"raw-window-handle",
|
||||
"scopeguard",
|
||||
"serde",
|
||||
@@ -2856,9 +2799,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac135e45c2923bd91edbb95a0d656f8d025389697e34d6d79166952bfa79c61c"
|
||||
checksum = "18203448b9d4dcad55607eafeda6dc7fe135848e5f567cd8bdade6cafd8b1a85"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"attohttpc",
|
||||
@@ -2909,9 +2852,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ef796f49abc98e6de0abe1b655120addc9d82363d8fc2304e71a4177c25e783c"
|
||||
checksum = "8807c85d656b2b93927c19fe5a5f1f1f348f96c2de8b90763b3c2d561511f9b4"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
@@ -2925,16 +2868,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "afcb77cf7bfe3d8f886e73a7fa6157587d015c599671180b76595c1aef175ba8"
|
||||
checksum = "14388d484b6b1b5dc0f6a7d6cc6433b3b230bec85eaa576adcdf3f9fafa49251"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"brotli",
|
||||
"ico",
|
||||
"json-patch",
|
||||
"plist",
|
||||
"png 0.17.7",
|
||||
"png",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
@@ -2951,9 +2894,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f24f481b0b2acfc288ac78755f00ebea53992c7365a165af64cb5ae00806edea"
|
||||
checksum = "069319e5ecbe653a799b94b0690d9f9bf5d00f7b1d3989aa331c524d4e354075"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"proc-macro2",
|
||||
@@ -2965,9 +2908,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "0.12.0"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fc5d54c476defa5436e70e0d0a06e3cb0f49b6f863895995d5e3769411769cf"
|
||||
checksum = "c507d954d08ac8705d235bc70ec6975b9054fb95ff7823af72dbb04186596f3b"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@@ -2985,9 +2928,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "0.12.0"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d78c55091701426c2519c7e9f1dc2dd33e533af4e75eae89cedc6995409351a2"
|
||||
checksum = "7821c34cf1bd6d89ff46b46a53f3a5050d92afaf2053569f1cc4531167257b24"
|
||||
dependencies = [
|
||||
"cocoa",
|
||||
"gtk",
|
||||
@@ -3005,9 +2948,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "1.2.0"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d64c9a09ba1538b8e67ae8c78c10904f36ce38d364bf7f089ec807032a826b02"
|
||||
checksum = "5abbc109a6eb45127956ffcc26ef0e875d160150ac16cfa45d26a6b2871686f1"
|
||||
dependencies = [
|
||||
"brotli",
|
||||
"ctor",
|
||||
@@ -3913,9 +3856,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "x11"
|
||||
version = "2.20.0"
|
||||
version = "2.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7ae97874a928d821b061fce3d1fc52f08071dd53c89a6102bc06efcac3b2908"
|
||||
checksum = "c2638d5b9c17ac40575fb54bb461a4b1d2a8d1b4ffcc4ff237d254ec59ddeb82"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"pkg-config",
|
||||
@@ -3923,9 +3866,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "x11-dl"
|
||||
version = "2.20.0"
|
||||
version = "2.20.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6"
|
||||
checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"libc",
|
||||
|
||||
@@ -12,15 +12,14 @@ rust-version = "1.61.0"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.2.0", features = [] }
|
||||
|
||||
tauri-build = { version = "1.2.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.88"
|
||||
serde = { version = "1.0.147", features = ["derive"] }
|
||||
tauri = { version = "1.2.0", features = ["api-all"] }
|
||||
tauri = { version = "1.2.1", features = ["api-all"] }
|
||||
image = "0.24.5"
|
||||
tauri-utils = "1.2.0"
|
||||
tauri-utils = "1.2.1"
|
||||
webbrowser = "0.8.2"
|
||||
wry = "0.22.4"
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ fn main() -> wry::Result<()> {
|
||||
let event_loop = EventLoop::new();
|
||||
|
||||
let common_window = WindowBuilder::new()
|
||||
.with_title("")
|
||||
.with_resizable(resizable)
|
||||
.with_fullscreen(if fullscreen {
|
||||
Some(Fullscreen::Borderless(None))
|
||||
@@ -123,14 +124,12 @@ fn main() -> wry::Result<()> {
|
||||
#[cfg(target_os = "windows")]
|
||||
let window = common_window
|
||||
.with_decorations(true)
|
||||
.with_title("")
|
||||
.with_window_icon(Some(icon))
|
||||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
let window = common_window
|
||||
.with_title("")
|
||||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
@@ -158,29 +157,30 @@ fn main() -> wry::Result<()> {
|
||||
webbrowser::open(&href).expect("no browser");
|
||||
}
|
||||
};
|
||||
// 用于欺骗有些页面对于浏览器的检测
|
||||
let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36";
|
||||
|
||||
// 用于欺骗部分页面对于浏览器的强检测
|
||||
let user_agent_string = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15";
|
||||
|
||||
#[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")]
|
||||
|
||||
Reference in New Issue
Block a user