mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
SetupWizard: initial commit
This commit is contained in:
26
shell.qml
26
shell.qml
@@ -40,6 +40,7 @@ import qs.Modules.OSD
|
||||
import qs.Modules.Settings
|
||||
import qs.Modules.Toast
|
||||
import qs.Modules.Wallpaper
|
||||
import qs.Modules.SetupWizard
|
||||
|
||||
ShellRoot {
|
||||
id: shellRoot
|
||||
@@ -89,6 +90,10 @@ ShellRoot {
|
||||
HooksService.init()
|
||||
BluetoothService.init()
|
||||
BatteryService.init()
|
||||
|
||||
if (Settings && Settings.data && Settings.data.general && !Settings.data.general.setupCompleted) {
|
||||
setupWizardLoader.active = true
|
||||
}
|
||||
}
|
||||
|
||||
Background {}
|
||||
@@ -166,6 +171,27 @@ ShellRoot {
|
||||
id: batteryPanel
|
||||
objectName: "batteryPanel"
|
||||
}
|
||||
|
||||
// Lazy-load Setup Wizard to save memory
|
||||
Component {
|
||||
id: setupWizardComponent
|
||||
SetupWizard {
|
||||
id: setupWizardPanel
|
||||
objectName: "setupWizardPanel"
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: setupWizardLoader
|
||||
active: false
|
||||
asynchronous: true
|
||||
sourceComponent: setupWizardComponent
|
||||
onLoaded: {
|
||||
if (setupWizardLoader.item && setupWizardLoader.item.open) {
|
||||
setupWizardLoader.item.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user