Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

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

Viren Mohindra0a7a1a0aa56d
diff --git a/src-tauri/src/tray.rs b/src-tauri/src/tray.rs
index ce021238..b77a623e 100644
--- a/src-tauri/src/tray.rs
+++ b/src-tauri/src/tray.rs
@@ -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(