Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,18 @@ class Launcher {
}
}

const themeName = this.config.theme || 'forge-light'
// Mirror the NR5+ theme gate from nr-launcher's runtimeSettings.js.
const storedTheme = this.config.theme || 'forge-light'
const snapshotNRVersion = this.snapshot?.modules?.['node-red']
const nrMajor = parseInt((snapshotNRVersion || '0.0.0').split('.')[0], 10) || 0
let themeName = storedTheme
if (nrMajor >= 5) {
if (themeName === 'forge-light' || themeName === 'forge-dark' || themeName === 'forge') {
themeName = 'forge'
}
} else if (themeName === 'forge') {
themeName = 'forge-light'
}
const assistant = {
enabled: this.settings?.assistant?.enabled || false, // overall enable/disable
url: `${this.config.forgeURL}/api/v1/assistant/`, // URL for the assistant service
Expand Down
Loading