🐛 格式兼容
This commit is contained in:
@@ -3,7 +3,7 @@ use tauri::MenuItem;
|
|||||||
use tauri::{CustomMenuItem, Menu, Submenu, WindowMenuEvent};
|
use tauri::{CustomMenuItem, Menu, Submenu, WindowMenuEvent};
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
#[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 {
|
pub fn get_menu() -> Menu {
|
||||||
// first menu
|
// first menu
|
||||||
@@ -71,7 +71,7 @@ pub fn get_system_tray(show_menu: bool) -> SystemTray {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
#[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 {
|
if let SystemTrayEvent::MenuItemClick { tray_id: _, id, .. } = event {
|
||||||
match id.as_str() {
|
match id.as_str() {
|
||||||
"hide_app" => {
|
"hide_app" => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
pub mod menu;
|
|
||||||
pub mod window;
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
pub mod invoke;
|
pub mod invoke;
|
||||||
|
pub mod menu;
|
||||||
|
pub mod window;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use crate::app::config::PakeConfig;
|
use crate::app::config::PakeConfig;
|
||||||
use tauri::Config;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use tauri::Config;
|
||||||
|
|
||||||
pub fn get_pake_config() -> (PakeConfig, Config) {
|
pub fn get_pake_config() -> (PakeConfig, Config) {
|
||||||
let pake_config: PakeConfig =
|
let pake_config: PakeConfig =
|
||||||
|
|||||||
Reference in New Issue
Block a user