mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
Add hide option for updater widget (#1028)
This commit is contained in:
@@ -352,6 +352,7 @@ Singleton {
|
|||||||
property string customPowerActionReboot: ""
|
property string customPowerActionReboot: ""
|
||||||
property string customPowerActionPowerOff: ""
|
property string customPowerActionPowerOff: ""
|
||||||
|
|
||||||
|
property bool updaterHideWidget: false
|
||||||
property bool updaterUseCustomCommand: false
|
property bool updaterUseCustomCommand: false
|
||||||
property string updaterCustomCommand: ""
|
property string updaterCustomCommand: ""
|
||||||
property string updaterTerminalAdditionalParams: ""
|
property string updaterTerminalAdditionalParams: ""
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ var SPEC = {
|
|||||||
customPowerActionReboot: { def: "" },
|
customPowerActionReboot: { def: "" },
|
||||||
customPowerActionPowerOff: { def: "" },
|
customPowerActionPowerOff: { def: "" },
|
||||||
|
|
||||||
|
updaterHideWidget: { def: false },
|
||||||
updaterUseCustomCommand: { def: false },
|
updaterUseCustomCommand: { def: false },
|
||||||
updaterCustomCommand: { def: "" },
|
updaterCustomCommand: { def: "" },
|
||||||
updaterTerminalAdditionalParams: { def: "" },
|
updaterTerminalAdditionalParams: { def: "" },
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ BasePill {
|
|||||||
readonly property bool hasUpdates: SystemUpdateService.updateCount > 0
|
readonly property bool hasUpdates: SystemUpdateService.updateCount > 0
|
||||||
readonly property bool isChecking: SystemUpdateService.isChecking
|
readonly property bool isChecking: SystemUpdateService.isChecking
|
||||||
|
|
||||||
|
readonly property real horizontalPadding: (barConfig?.noBackground ?? false) ? 2 : Theme.spacingS
|
||||||
|
width : (SettingsData.updaterHideWidget && !hasUpdates) ? 0 : (18 + horizontalPadding * 2)
|
||||||
|
|
||||||
Ref {
|
Ref {
|
||||||
service: SystemUpdateService
|
service: SystemUpdateService
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,15 @@ Item {
|
|||||||
iconName: "refresh"
|
iconName: "refresh"
|
||||||
title: I18n.tr("System Updater")
|
title: I18n.tr("System Updater")
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
text: I18n.tr("Hide Updater Widget", "When updater widget is used, then hide it if no update found")
|
||||||
|
description: I18n.tr("When updater widget is used, then hide it if no update found")
|
||||||
|
checked: SettingsData.updaterHideWidget
|
||||||
|
onToggled: checked => {
|
||||||
|
SettingsData.set("updaterHideWidget", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
text: I18n.tr("Use Custom Command")
|
text: I18n.tr("Use Custom Command")
|
||||||
description: I18n.tr("Use custom command for update your system")
|
description: I18n.tr("Use custom command for update your system")
|
||||||
|
|||||||
Reference in New Issue
Block a user