⬆️ 更新依赖

This commit is contained in:
BTMuli
2025-05-05 21:45:44 +08:00
parent e98c7a580f
commit 27c79aec62
7 changed files with 1746 additions and 1347 deletions

651
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -17,15 +17,15 @@ name = "teyvat_guide_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2.1.1", features = [] }
tauri-build = { version = "2.2.0", features = [] }
[dependencies]
chrono = "0.4.40"
log = "0.4.27"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
tauri = { version = "2.4.1", features = [] }
tauri-utils = "2.3.1"
tauri = { version = "2.5.1", features = [] }
tauri-utils = "2.4.0"
url = "2.5.4"
walkdir = "2.5.0"

View File

@@ -1,6 +1,6 @@
//! @file src/client/menu.rs
//! @desc 客户端菜单模块,负责操作米游社客户端菜单
//! @since Beta v0.5.2
//! @since Beta v0.7.4
use crate::client::utils;
use tauri::menu::{Menu, MenuBuilder, MenuEvent, MenuItemBuilder, Submenu, SubmenuBuilder};
@@ -124,7 +124,7 @@ fn handle_menu_open_post(app_handle: &Window) {
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
})()"#;
if window.is_some() {
window.unwrap().eval(&execute_js).ok().unwrap();
window.unwrap().eval(execute_js).ok().unwrap();
}
}
@@ -139,7 +139,7 @@ fn handle_menu_retry(app_handle: &Window) {
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
})()"#;
if window.is_some() {
window.unwrap().eval(&execute_js).ok().unwrap();
window.unwrap().eval(execute_js).ok().unwrap();
}
}
@@ -154,7 +154,7 @@ fn handle_menu_mock_touch(app_handle: &Window) {
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
})()"#;
if window.is_some() {
window.unwrap().eval(&execute_js).ok().unwrap();
window.unwrap().eval(execute_js).ok().unwrap();
}
}
@@ -169,7 +169,7 @@ fn handle_menu_remove_overlay(app_handle: &Window) {
await window.__TAURI__.event.emit('post_mhy_client',JSON.stringify(arg));
})()"#;
if window.is_some() {
window.unwrap().eval(&execute_js).ok().unwrap();
window.unwrap().eval(execute_js).ok().unwrap();
}
}

View File

@@ -1,6 +1,6 @@
//! @file src/commands.rs
//! @desc 命令模块,负责处理命令
//! @since Beta v0.7.2
//! @since Beta v0.7.4
use tauri::{AppHandle, Emitter, Manager, WebviewWindowBuilder};
use tauri_utils::config::{WebviewUrl, WindowConfig};
@@ -52,7 +52,7 @@ pub async fn create_window(
pub async fn execute_js(app_handle: AppHandle, label: String, js: String) {
let window = app_handle.get_webview_window(&label);
if window.is_some() {
window.unwrap().eval(&js).unwrap();
window.unwrap().eval(js).unwrap();
}
}