Updates: opt-in launch check, Check for Updates…, install after a normal quit, from the Gitea release; dmgs carry an Applications link (UPD-1, REL-1)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 16:34:32 -04:00
1 parent fa273aff13
commit b03c9f2853
28 files changed
+896 -16

No files matched your search

+6 -1
View File
@@ -18,6 +18,7 @@ actions!(
CloseTab,
ToggleCommandPalette,
OpenSettings,
CheckForUpdates,
Quit
]
);
@@ -43,7 +44,7 @@ pub fn bind_quit(cx: &mut App) {
}
/// Quits through the main window's route, if one is set.
fn quit(cx: &mut App) {
pub(crate) fn quit(cx: &mut App) {
match cx.try_global::<QuitRoute>().map(|route| Rc::clone(&route.0)) {
Some(route) => route(cx),
None => cx.quit(),
@@ -171,6 +172,10 @@ pub fn menus(
first.push(MenuItem::separator());
}
first.push(MenuItem::action(i18n::text(cx, "menu.app.settings", &[]), OpenSettings));
// Only an installed app can update itself.
if crate::updates::updater(cx).is_some() {
first.push(MenuItem::action(i18n::text(cx, "menu.app.updates", &[]), CheckForUpdates));
}
first.push(MenuItem::separator());
first.push(MenuItem::action(i18n::text(cx, "menu.app.quit", &[("app", app.name())]), Quit));
let mut menus = vec![