forked from 1b-agent/fieldcraft-upstream
UI: update notice, Help › Check for Updates and Reinstall, Settings › Updates (#231)
The window checks at start-up at most once a day when automatic checks are on (Settings and
the first run's question), never while that question is open and never without a host, so the
browser and tests make no network call. A newer release shows a quiet notice in the status bar
("FieldCraft X is available — What's new · Install · Skip"); Install downloads and verifies
through the host, then asks to restart, saving or asking about unsaved changes first, and the
host swaps the release in after the window closes. A .deb/.rpm install offers the system's
installer and the command instead. Skip this version is kept in the preferences.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
69c1440cbe
commit
2e28a69c04
9 files changed
+664
-9
No files matched your search
@@ -340,10 +340,23 @@ fn help_menu(app: &mut ModelApp, ui: &mut egui::Ui) {
|
||||
.button("Report a Bug…")
|
||||
.on_hover_text("Draft a GitHub issue with the version, the OS and the last error; nothing is sent until you submit it")
|
||||
.clicked();
|
||||
let settings = ui.button("Settings…").on_hover_text("Privacy: anonymous usage sharing").clicked();
|
||||
let (mut check, mut reinstall) = (false, false);
|
||||
if app.updates_available() {
|
||||
check =
|
||||
ui.button("Check for Updates").on_hover_text("Ask GitHub Releases whether a newer FieldCraft is published (app.update.check)").clicked();
|
||||
reinstall = ui
|
||||
.button("Reinstall FieldCraft…")
|
||||
.on_hover_text("Download this version again, verify it and swap it in, to repair a damaged install")
|
||||
.clicked();
|
||||
}
|
||||
let settings = ui.button("Settings…").on_hover_text("Privacy and updates").clicked();
|
||||
ui.label(egui::RichText::new(format!("FieldCraft {}", crate::VERSION)).color(t.text_dim));
|
||||
if report {
|
||||
app.report_bug(None);
|
||||
} else if check {
|
||||
app.check_for_updates();
|
||||
} else if reinstall {
|
||||
app.reinstall();
|
||||
} else if settings {
|
||||
app.open_settings();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user