updater: confirm installs on enter & keeps the upgrade log in view when inline

Port 2.0

(cherry picked from commit a92e60ebef)
This commit is contained in:
purian23 authored and dux-ci[bot] committed 2026-10-27 03:21:53 +00:00
1 parent 28b9bb246b
commit 7ea6f5f7e0
2 files changed
+21 -1

No files matched your search

@@ -39,7 +39,7 @@ Item {
onCancel = options.onCancel || (() => {});
visible = true;
dialogContent.keyboardNavigation = false;
dialogContent.selectedButton = 0;
dialogContent.selectedButton = options.confirmByDefault === true ? 1 : 0;
focusDialog();
}
@@ -234,6 +234,7 @@ Item {
title: I18n.tr("Install system updates?", "confirmation dialog title before running the system upgrade"),
message: root.installSummary(),
confirmText: I18n.tr("Install", "install action button"),
confirmByDefault: true,
onConfirm: () => root.runUpdateAll()
});
return;
@@ -277,13 +278,31 @@ Item {
interactive: interactive === true
});
packagesExpanded = false;
followUpgradeLog = true;
if (upgradeInWindow && interactive !== true)
PopoutService.showSystemUpdateModal();
}
property bool followUpgradeLog: false
readonly property bool upgrading: SystemUpdateService.isUpgrading
onUpgradingChanged: {
if (!upgrading)
followUpgradeLog = false;
}
function revealUpgradeLog() {
if (!followUpgradeLog || !upgradeLogRow.visible)
return;
const top = upgradeLogRow.mapToItem(mainColumn.contentItem, 0, 0).y;
mainColumn.revealRange(top, top + upgradeLogRow.height);
}
SettingsPage {
id: mainColumn
onContentHeightChanged: root.revealUpgradeLog()
ReleaseHero {
M3WaveProgress {
width: parent.width
@@ -505,6 +524,7 @@ Item {
}
SettingsRow {
id: upgradeLogRow
visible: (SystemUpdateService.isUpgrading && !root.upgradeInWindow) || (root.upgradeFailed && !root.upgradeRunsInTerminal)
body: Item {
readonly property real lineHeight: logText.implicitHeight / Math.max(1, logText.lineCount)