1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

system updater: make all distros use terminal

This commit is contained in:
bbedward
2026-04-29 14:40:16 -04:00
parent baaa30c94e
commit 1467f5dba9
15 changed files with 98 additions and 222 deletions

View File

@@ -57,8 +57,6 @@ DankPopout {
color: "transparent"
focus: true
readonly property bool hasTerminalBackend: (SystemUpdateService.backends || []).some(b => b.runsInTerminal === true)
Keys.onPressed: event => {
if (event.key === Qt.Key_Escape) {
systemUpdatePopout.close();
@@ -208,13 +206,9 @@ DankPopout {
includeAUR: SettingsData.updaterAllowAUR,
terminal: SessionData.terminalOverride
};
if (updaterPanel.hasTerminalBackend) {
systemUpdatePopout._reopenAfterUpgrade = true;
SystemUpdateService.runUpdates(opts);
systemUpdatePopout.close();
return;
}
systemUpdatePopout._reopenAfterUpgrade = true;
SystemUpdateService.runUpdates(opts);
systemUpdatePopout.close();
}
}
@@ -383,7 +377,7 @@ DankPopout {
anchors.fill: parent
anchors.margins: Theme.spacingM
spacing: Theme.spacingS
visible: SystemUpdateService.isUpgrading && updaterPanel.hasTerminalBackend
visible: SystemUpdateService.isUpgrading
DankIcon {
anchors.horizontalCenter: parent.horizontalCenter
@@ -403,38 +397,13 @@ DankPopout {
StyledText {
width: parent.width
text: I18n.tr("AUR helpers are interactive — see the terminal window for prompts. This popout will return to idle when the upgrade exits.")
text: I18n.tr("See the terminal window for prompts. This popout will return when the upgrade exits.")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
}
}
DankFlickable {
anchors.fill: parent
anchors.margins: Theme.spacingM
visible: SystemUpdateService.isUpgrading && !updaterPanel.hasTerminalBackend
contentWidth: width
contentHeight: logText.implicitHeight
clip: true
onContentHeightChanged: {
if (contentHeight > height) {
contentY = contentHeight - height;
}
}
StyledText {
id: logText
width: parent.width
text: (SystemUpdateService.recentLog || []).join("\n")
font.family: Theme.monoFontFamily || "monospace"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
wrapMode: Text.NoWrap
}
}
}
}
}

View File

@@ -9,7 +9,6 @@ Rectangle {
property string iconName: ""
property string text: ""
property bool isDestructive: false
property bool enabled: true
signal triggered