🐛 格式兼容

This commit is contained in:
Tw93
2023-04-06 09:50:56 +08:00
parent 9cc7d2ece4
commit 174f780354
3 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ use tauri::MenuItem;
use tauri::{CustomMenuItem, Menu, Submenu, WindowMenuEvent};
#[cfg(any(target_os = "linux", target_os = "windows"))]
use tauri::{Manager, SystemTray, SystemTrayMenu, WindowBuilder, WindowUrl};
use tauri::{Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, WindowBuilder, WindowUrl};
pub fn get_menu() -> Menu {
// first menu
@@ -71,7 +71,7 @@ pub fn get_system_tray(show_menu: bool) -> SystemTray {
}
#[cfg(any(target_os = "linux", target_os = "windows"))]
pub fn system_tray_handle(app: &tauri::AppHandle, event: tauri::SystemTrayEvent) {
pub fn system_tray_handle(app: &tauri::AppHandle, event: SystemTrayEvent) {
if let SystemTrayEvent::MenuItemClick { tray_id: _, id, .. } = event {
match id.as_str() {
"hide_app" => {

View File

@@ -1,4 +1,4 @@
pub mod menu;
pub mod window;
pub mod config;
pub mod invoke;
pub mod menu;
pub mod window;

View File

@@ -1,6 +1,6 @@
use crate::app::config::PakeConfig;
use tauri::Config;
use std::path::PathBuf;
use tauri::Config;
pub fn get_pake_config() -> (PakeConfig, Config) {
let pake_config: PakeConfig =