1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Add support for plugin registry + install + management

This commit is contained in:
bbedward
2025-10-06 15:26:44 -04:00
parent 89793d2d62
commit 1e2489ca76
9 changed files with 968 additions and 34 deletions

View File

@@ -32,16 +32,21 @@ import qs.Services
ShellRoot {
id: root
property bool servicesReady: false
Component.onCompleted: {
PortalService.init()
DisplayService.nightModeEnabled
WallpaperCyclingService.cyclingActive
PluginService.pluginDirectory
Qt.callLater(() => {
servicesReady = true
})
}
Instantiator {
id: daemonPluginInstantiator
model: Object.keys(PluginService.pluginDaemonComponents)
model: servicesReady ? Object.keys(PluginService.pluginDaemonComponents) : []
delegate: Loader {
id: daemonLoader
@@ -74,17 +79,22 @@ ShellRoot {
asynchronous: false
property var currentPosition: SettingsData.dankBarPosition
property bool initialized: false
sourceComponent: DankBar {
onColorPickerRequested: colorPickerModal.show()
}
Component.onCompleted: {
initialized = true
}
onCurrentPositionChanged: {
if (!initialized) return
const component = sourceComponent
sourceComponent = null
Qt.callLater(() => {
sourceComponent = component
})
sourceComponent = component
}
}
@@ -94,6 +104,7 @@ ShellRoot {
asynchronous: false
property var currentPosition: SettingsData.dockPosition
property bool initialized: false
sourceComponent: Dock {
contextMenu: dockContextMenuLoader.item ? dockContextMenuLoader.item : null
@@ -105,13 +116,17 @@ ShellRoot {
}
}
Component.onCompleted: {
initialized = true
}
onCurrentPositionChanged: {
if (!initialized) return
console.log("DEBUG: Dock position changed to:", currentPosition, "- recreating dock")
const comp = sourceComponent
sourceComponent = null
Qt.callLater(() => {
sourceComponent = comp
})
sourceComponent = comp
}
}