mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-06-06 16:13:41 +00:00
feat(menu): show current version on the Check-for-Updates entry
Appends ' · v{CARGO_PKG_VERSION}' to every state of the version-action
menu item so users can see what they are running without opening an
About dialog. Reads as 'Check for updates · v0.1.7', 'Up to date ·
v0.1.7', etc. Winget channel decoration is preserved as a trailing
parenthetical.
Bumps version to 0.1.7.
This commit is contained in:
+6
-2
@@ -1067,9 +1067,13 @@ fn version_action_label(snap: &ContextMenuSnapshot) -> String {
|
||||
UpdateStatus::Applying => snap.strings.applying_update.clone(),
|
||||
UpdateStatus::Failed => snap.strings.update_failed.clone(),
|
||||
};
|
||||
// Append the running binary's version so the user can see what
|
||||
// they are on without opening an About dialog. Using middle-dot as
|
||||
// the separator matches the bubble's countdown formatting.
|
||||
let with_version = format!("{base} \u{00b7} v{}", env!("CARGO_PKG_VERSION"));
|
||||
match snap.install_channel {
|
||||
InstallChannel::Winget => format!("{base} ({})", snap.strings.update_via_winget),
|
||||
InstallChannel::Portable => base,
|
||||
InstallChannel::Winget => format!("{with_version} ({})", snap.strings.update_via_winget),
|
||||
InstallChannel::Portable => with_version,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user