Skip to content

Commit 832e70f

Browse files
committed
v1.2.0
- Added check for updates and ability to self-update
1 parent d6ea143 commit 832e70f

File tree

6 files changed

+650
-7
lines changed

6 files changed

+650
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "claude-code-usage-monitor"
3-
version = "1.1.0"
3+
version = "1.2.0"
44
edition = "2021"
55
license = "MIT"
66
description = "Windows taskbar widget for monitoring Claude Code usage and rate limits"

src/localization.rs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ pub struct Strings {
8383
pub reset_position: &'static str,
8484
pub language: &'static str,
8585
pub system_default: &'static str,
86+
pub check_for_updates: &'static str,
87+
pub checking_for_updates: &'static str,
88+
pub updates: &'static str,
89+
pub update_in_progress: &'static str,
90+
pub up_to_date: &'static str,
91+
pub up_to_date_short: &'static str,
92+
pub update_failed: &'static str,
93+
pub applying_update: &'static str,
94+
pub update_to: &'static str,
8695
pub exit: &'static str,
8796
pub session_window: &'static str,
8897
pub weekly_window: &'static str,
@@ -106,6 +115,15 @@ const ENGLISH: Strings = Strings {
106115
reset_position: "Reset Position",
107116
language: "Language",
108117
system_default: "System Default",
118+
check_for_updates: "Check for Updates",
119+
checking_for_updates: "Checking for Updates...",
120+
updates: "Updates",
121+
update_in_progress: "An update check is already in progress.",
122+
up_to_date: "You already have the latest version.",
123+
up_to_date_short: "Up to date",
124+
update_failed: "Unable to update automatically",
125+
applying_update: "Applying update...",
126+
update_to: "Update to",
109127
exit: "Exit",
110128
session_window: "5h",
111129
weekly_window: "7d",
@@ -129,6 +147,15 @@ const SPANISH: Strings = Strings {
129147
reset_position: "Restablecer posicion",
130148
language: "Idioma",
131149
system_default: "Predeterminado del sistema",
150+
check_for_updates: "Buscar actualizaciones",
151+
checking_for_updates: "Buscando actualizaciones...",
152+
updates: "Actualizaciones",
153+
update_in_progress: "Ya hay una comprobacion de actualizacion en curso.",
154+
up_to_date: "Ya tienes la version mas reciente.",
155+
up_to_date_short: "Actualizado",
156+
update_failed: "No se pudo actualizar automaticamente",
157+
applying_update: "Aplicando actualizacion...",
158+
update_to: "Actualizar a",
132159
exit: "Salir",
133160
session_window: "5h",
134161
weekly_window: "7d",
@@ -152,6 +179,15 @@ const FRENCH: Strings = Strings {
152179
reset_position: "Reinitialiser la position",
153180
language: "Langue",
154181
system_default: "Par defaut du systeme",
182+
check_for_updates: "Verifier les mises a jour",
183+
checking_for_updates: "Verification des mises a jour...",
184+
updates: "Mises a jour",
185+
update_in_progress: "Une verification de mise a jour est deja en cours.",
186+
up_to_date: "Vous utilisez deja la version la plus recente.",
187+
up_to_date_short: "A jour",
188+
update_failed: "Impossible d'effectuer la mise a jour automatiquement",
189+
applying_update: "Application de la mise a jour...",
190+
update_to: "Mettre a jour vers",
155191
exit: "Quitter",
156192
session_window: "5h",
157193
weekly_window: "7d",
@@ -175,6 +211,15 @@ const GERMAN: Strings = Strings {
175211
reset_position: "Position zurucksetzen",
176212
language: "Sprache",
177213
system_default: "Systemstandard",
214+
check_for_updates: "Nach Updates suchen",
215+
checking_for_updates: "Suche nach Updates...",
216+
updates: "Updates",
217+
update_in_progress: "Eine Update-Prufung lauft bereits.",
218+
up_to_date: "Sie verwenden bereits die neueste Version.",
219+
up_to_date_short: "Aktuell",
220+
update_failed: "Automatisches Update war nicht moglich",
221+
applying_update: "Update wird installiert...",
222+
update_to: "Aktualisieren auf",
178223
exit: "Beenden",
179224
session_window: "5h",
180225
weekly_window: "7d",
@@ -198,6 +243,15 @@ const JAPANESE: Strings = Strings {
198243
reset_position: "位置をリセット",
199244
language: "言語",
200245
system_default: "システム既定",
246+
check_for_updates: "更新を確認",
247+
checking_for_updates: "更新を確認しています...",
248+
updates: "更新",
249+
update_in_progress: "更新確認は既に実行中です。",
250+
up_to_date: "既に最新バージョンです。",
251+
up_to_date_short: "最新です",
252+
update_failed: "自動更新を完了できませんでした",
253+
applying_update: "更新を適用しています...",
254+
update_to: "更新先",
201255
exit: "終了",
202256
session_window: "5h",
203257
weekly_window: "7d",

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ mod models;
55
mod native_interop;
66
mod poller;
77
mod theme;
8+
mod updater;
89
mod window;
910

1011
fn main() {
12+
let args: Vec<String> = std::env::args().collect();
13+
if let Some(exit_code) = updater::handle_cli_mode(&args) {
14+
std::process::exit(exit_code);
15+
}
1116
window::run();
1217
}

0 commit comments

Comments
 (0)