mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-19 04:29:45 +08:00
⬆️ 更新依赖
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user