mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
@@ -12,6 +12,7 @@ Singleton {
|
||||
property string osPretty: ""
|
||||
property string osLogo: ""
|
||||
property bool isNixOS: false
|
||||
property bool isReady: false
|
||||
|
||||
// Internal helpers
|
||||
function buildCandidates(name) {
|
||||
@@ -79,8 +80,10 @@ Singleton {
|
||||
const osId = (val("ID") || "").toLowerCase()
|
||||
root.isNixOS = osId === "nixos" || (root.osPretty || "").toLowerCase().includes("nixos")
|
||||
const logoName = val("LOGO")
|
||||
if (logoName)
|
||||
resolveLogo(logoName)
|
||||
if (logoName) {
|
||||
resolveLogo(logoName)
|
||||
}
|
||||
root.isReady = true
|
||||
} catch (e) {
|
||||
Logger.w("DistroService", "failed to read os-release", e)
|
||||
}
|
||||
|
||||
30
shell.qml
30
shell.qml
@@ -190,16 +190,28 @@ ShellRoot {
|
||||
function onSettingsLoaded() {
|
||||
// Only open the setup wizard for new users
|
||||
if (!Settings.data.setupCompleted) {
|
||||
if (DistroService && DistroService.isNixOS) {
|
||||
Settings.data.setupCompleted = true
|
||||
return
|
||||
}
|
||||
if (Settings.data.settingsVersion >= Settings.settingsVersion) {
|
||||
setupWizardLoader.active = true
|
||||
} else {
|
||||
Settings.data.setupCompleted = true
|
||||
}
|
||||
checkSetupWizard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkSetupWizard() {
|
||||
// Wait for distro service
|
||||
if (!DistroService.isReady) {
|
||||
Qt.callLater(checkSetupWizard)
|
||||
return
|
||||
}
|
||||
|
||||
// No setup wizard on NixOS
|
||||
if (DistroService.isNixOS) {
|
||||
Settings.data.setupCompleted = true
|
||||
return
|
||||
}
|
||||
|
||||
if (Settings.data.settingsVersion >= Settings.settingsVersion) {
|
||||
setupWizardLoader.active = true
|
||||
} else {
|
||||
Settings.data.setupCompleted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user