chore: fmt

This commit is contained in:
lencx
2023-01-08 21:32:42 +08:00
parent c99f4b7633
commit e68ab20420
2 changed files with 8 additions and 9 deletions

View File

@@ -41,10 +41,6 @@ pub fn init() -> Menu {
stay_on_top stay_on_top
}; };
#[cfg(target_os = "macos")]
let titlebar =
CustomMenuItem::new("titlebar".to_string(), "Titlebar").accelerator("CmdOrCtrl+B");
let theme_light = CustomMenuItem::new("theme_light".to_string(), "Light"); let theme_light = CustomMenuItem::new("theme_light".to_string(), "Light");
let theme_dark = CustomMenuItem::new("theme_dark".to_string(), "Dark"); let theme_dark = CustomMenuItem::new("theme_dark".to_string(), "Dark");
let theme_system = CustomMenuItem::new("theme_system".to_string(), "System"); let theme_system = CustomMenuItem::new("theme_system".to_string(), "System");
@@ -62,6 +58,9 @@ pub fn init() -> Menu {
popup_search popup_search
}; };
#[cfg(target_os = "macos")]
let titlebar =
CustomMenuItem::new("titlebar".to_string(), "Titlebar").accelerator("CmdOrCtrl+B");
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
let titlebar_menu = if chat_conf.titlebar { let titlebar_menu = if chat_conf.titlebar {
titlebar.selected() titlebar.selected()

View File

@@ -45,6 +45,11 @@ async fn main() {
]) ])
.build(), .build(),
) )
.plugin(tauri_plugin_positioner::init())
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
None,
))
.invoke_handler(tauri::generate_handler![ .invoke_handler(tauri::generate_handler![
cmd::drag_window, cmd::drag_window,
cmd::fullscreen, cmd::fullscreen,
@@ -68,11 +73,6 @@ async fn main() {
fs_extra::metadata, fs_extra::metadata,
]) ])
.setup(setup::init) .setup(setup::init)
.plugin(tauri_plugin_positioner::init())
.plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
None,
))
.menu(menu::init()) .menu(menu::init())
.system_tray(menu::tray_menu()) .system_tray(menu::tray_menu())
.on_menu_event(menu::menu_handler) .on_menu_event(menu::menu_handler)