1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 00:12:50 -05:00

make system updater widget more generic

This commit is contained in:
bbedward
2025-09-15 11:55:15 -04:00
parent e4f86abda9
commit 903ef0cc72
6 changed files with 86 additions and 61 deletions

View File

@@ -184,7 +184,7 @@ PanelWindow {
"loader": clipboardHistoryModalPopup,
"prop": "visible"
}, {
"loader": archUpdaterLoader,
"loader": systemUpdateLoader,
"prop": "shouldBeVisible"
}]
return notepadInstanceVisible || loaders.some(item => {
@@ -377,7 +377,7 @@ PanelWindow {
"vpn": vpnComponent,
"notepadButton": notepadButtonComponent,
"colorPicker": colorPickerComponent,
"archUpdater": archUpdaterComponent
"systemUpdate": systemUpdateComponent
})
function getWidgetComponent(widgetId) {
@@ -1022,21 +1022,21 @@ PanelWindow {
}
Component {
id: archUpdaterComponent
id: systemUpdateComponent
ArchUpdater {
isActive: archUpdaterLoader.item ? archUpdaterLoader.item.shouldBeVisible : false
SystemUpdate {
isActive: systemUpdateLoader.item ? systemUpdateLoader.item.shouldBeVisible : false
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight
section: topBarContent.getWidgetSection(parent) || "right"
popupTarget: {
archUpdaterLoader.active = true
return archUpdaterLoader.item
systemUpdateLoader.active = true
return systemUpdateLoader.item
}
parentScreen: root.screen
onClicked: {
archUpdaterLoader.active = true
archUpdaterLoader.item?.toggle()
systemUpdateLoader.active = true
systemUpdateLoader.item?.toggle()
}
}
}