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

Add an ArchUpdater widget (#201)

This commit is contained in:
Aziz Hasanain
2025-09-15 15:54:39 +03:00
committed by GitHub
parent 8ee43de145
commit e4f86abda9
6 changed files with 615 additions and 1 deletions

View File

@@ -183,6 +183,9 @@ PanelWindow {
}, {
"loader": clipboardHistoryModalPopup,
"prop": "visible"
}, {
"loader": archUpdaterLoader,
"prop": "shouldBeVisible"
}]
return notepadInstanceVisible || loaders.some(item => {
if (item.loader) {
@@ -373,7 +376,8 @@ PanelWindow {
"keyboard_layout_name": keyboardLayoutNameComponent,
"vpn": vpnComponent,
"notepadButton": notepadButtonComponent,
"colorPicker": colorPickerComponent
"colorPicker": colorPickerComponent,
"archUpdater": archUpdaterComponent
})
function getWidgetComponent(widgetId) {
@@ -1016,6 +1020,26 @@ PanelWindow {
}
}
}
Component {
id: archUpdaterComponent
ArchUpdater {
isActive: archUpdaterLoader.item ? archUpdaterLoader.item.shouldBeVisible : false
widgetHeight: root.widgetHeight
barHeight: root.effectiveBarHeight
section: topBarContent.getWidgetSection(parent) || "right"
popupTarget: {
archUpdaterLoader.active = true
return archUpdaterLoader.item
}
parentScreen: root.screen
onClicked: {
archUpdaterLoader.active = true
archUpdaterLoader.item?.toggle()
}
}
}
}
}
}