feat: add (Dev) indicator to tray menu version in debug builds (#470)

This commit is contained in:
Viren Mohindra 2025-12-18 17:45:29 +05:30 committed by GitHub
parent bfca46fcd6
commit 0a7a1a0aa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,7 +88,11 @@ pub fn update_tray_menu(app: &AppHandle, state: &TrayIconState, locale: Option<&
let (settings_accelerator, quit_accelerator) = (Some("Ctrl+,"), Some("Ctrl+Q"));
// Create common menu items
let version_label = format!("Handy v{}", env!("CARGO_PKG_VERSION"));
let version_label = if cfg!(debug_assertions) {
format!("Handy v{} (Dev)", env!("CARGO_PKG_VERSION"))
} else {
format!("Handy v{}", env!("CARGO_PKG_VERSION"))
};
let version_i = MenuItem::with_id(app, "version", &version_label, false, None::<&str>)
.expect("failed to create version item");
let settings_i = MenuItem::with_id(