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:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user