From 6038b896b16f1015dcad55223fb9a6d1ccd531eb Mon Sep 17 00:00:00 2001 From: Caleb Smith <3040113+calebsmithdev@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:06:15 -0600 Subject: [PATCH] Hide the window on Windows + added a tooltip for better identifying dev apps --- src-tauri/src/system_tray_menu.rs | 13 ++++++++++--- src-tauri/tauri.conf.json | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/system_tray_menu.rs b/src-tauri/src/system_tray_menu.rs index 37b1f6c..f6792a6 100644 --- a/src-tauri/src/system_tray_menu.rs +++ b/src-tauri/src/system_tray_menu.rs @@ -51,7 +51,7 @@ pub fn build_system_tray_menu(handle: &AppHandle) -> tauri::Result<()> { )?) .build()?; - TrayIconBuilder::new() + let mut tray_icon_builder = TrayIconBuilder::new() .menu(&menu) .menu_on_left_click(is_macos) .icon(handle.default_window_icon().unwrap().clone()) @@ -92,7 +92,14 @@ pub fn build_system_tray_menu(handle: &AppHandle) -> tauri::Result<()> { } } _ => {} - }) - .build(handle)?; + }); + + if cfg!(debug_assertions) { + tray_icon_builder = tray_icon_builder.tooltip("Dev Mode"); + } else { + tray_icon_builder = tray_icon_builder.tooltip("WoWthing Sync"); + } + + tray_icon_builder.build(handle)?; Ok(()) } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index cafbda8..d69f4eb 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -63,7 +63,8 @@ "resizable": false, "title": "WoWthing Sync", "decorations": true, - "useHttpsScheme": true + "useHttpsScheme": true, + "visible": false } ], "withGlobalTauri": false,