mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-28 05:57:47 -04:00
updater: confirm installs on enter & keeps the upgrade log in view when inline
Port 2.0
This commit is contained in:
1 parent
693d0c8bb7
commit
a92e60ebef
2 files changed
+21
-1
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user