mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
shell: only launch setupwizard if not nixos
DistroLogoService -> DistroService
This commit is contained in:
@@ -56,7 +56,7 @@ NIconButton {
|
||||
if (customIconPath !== "")
|
||||
return customIconPath.startsWith("file://") ? customIconPath : "file://" + customIconPath
|
||||
if (useDistroLogo)
|
||||
return DistroLogoService.osLogo
|
||||
return DistroService.osLogo
|
||||
return ""
|
||||
}
|
||||
visible: source !== ""
|
||||
|
||||
@@ -31,7 +31,7 @@ ColumnLayout {
|
||||
label: I18n.tr("bar.widget-settings.control-center.use-distro-logo.label")
|
||||
description: I18n.tr("bar.widget-settings.control-center.use-distro-logo.description")
|
||||
checked: valueUseDistroLogo
|
||||
onToggled: {
|
||||
onToggled: function (checked) {
|
||||
valueUseDistroLogo = checked
|
||||
if (checked) {
|
||||
valueCustomIconPath = ""
|
||||
|
||||
@@ -99,10 +99,10 @@ ColumnLayout {
|
||||
enabled: ProgramCheckerService.app2unitAvailable
|
||||
opacity: ProgramCheckerService.app2unitAvailable ? 1.0 : 0.6
|
||||
onToggled: checked => {
|
||||
if (ProgramCheckerService.app2unitAvailable) {
|
||||
Settings.data.appLauncher.useApp2Unit = checked
|
||||
}
|
||||
}
|
||||
if (ProgramCheckerService.app2unitAvailable) {
|
||||
Settings.data.appLauncher.useApp2Unit = checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
|
||||
@@ -11,6 +11,7 @@ Singleton {
|
||||
// Public properties
|
||||
property string osPretty: ""
|
||||
property string osLogo: ""
|
||||
property bool isNixOS: false
|
||||
|
||||
// Internal helpers
|
||||
function buildCandidates(name) {
|
||||
@@ -75,11 +76,13 @@ Singleton {
|
||||
return l ? l.split("=")[1].replace(/"/g, "") : ""
|
||||
}
|
||||
root.osPretty = val("PRETTY_NAME") || val("NAME")
|
||||
const osId = (val("ID") || "").toLowerCase()
|
||||
root.isNixOS = osId === "nixos" || (root.osPretty || "").toLowerCase().includes("nixos")
|
||||
const logoName = val("LOGO")
|
||||
if (logoName)
|
||||
resolveLogo(logoName)
|
||||
} catch (e) {
|
||||
Logger.warn("DistroLogoService", "failed to read os-release", e)
|
||||
Logger.warn("DistroService", "failed to read os-release", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,10 +93,10 @@ Singleton {
|
||||
const p = String(stdout.text || "").trim()
|
||||
if (code === 0 && p) {
|
||||
root.osLogo = `file://${p}`
|
||||
Logger.log("DistroLogoService", "found", root.osLogo)
|
||||
Logger.log("DistroService", "found", root.osLogo)
|
||||
} else {
|
||||
root.osLogo = ""
|
||||
Logger.warn("DistroLogoService", "none found")
|
||||
Logger.warn("DistroService", "none found")
|
||||
}
|
||||
}
|
||||
stdout: StdioCollector {}
|
||||
@@ -189,6 +189,10 @@ 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 {
|
||||
|
||||
Reference in New Issue
Block a user