Skip to content

Commit

Permalink
fix ui config validation when default theme selected
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Feb 23, 2025
1 parent 5258f0d commit cc2d453
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to `homebridge-config-ui-x` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).

## v4.71.1 (2025-02-22)
## BETA

### ⚠️ Upcoming Deprecations:

Expand All @@ -14,6 +14,13 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
- Note that Homebridge UI `v5` will not be released before May 2025 (aligning with when Node.js `v18` reaches end-of-life)
- Note that these are not requirements for UI `v4.71.1`

### Other Changes

- fix alpha/beta update checks for bundled ui (#2363) (@dnicolson)
- fix ui config validation when default theme selected

## v4.71.1 (2025-02-22)

### UI Changes

- updates to the `uk.json` language file (#2352) (@xrust83)
Expand Down
4 changes: 2 additions & 2 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"title": "UI Theme",
"description": "The theme used for the UI.",
"type": "string",
"default": "auto",
"default": "orange",
"oneOf": [
{
"title": "Orange",
"enum": [
"auto"
"orange"
]
},
{
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/core/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export class ConfigService {
if (!this.ui.port && process.env.HOMEBRIDGE_CONFIG_UI_PORT) {
this.ui.port = Number.parseInt(process.env.HOMEBRIDGE_CONFIG_UI_PORT, 10)
}
this.ui.theme = this.ui.theme || process.env.HOMEBRIDGE_CONFIG_UI_THEME || 'auto'
this.ui.theme = this.ui.theme || process.env.HOMEBRIDGE_CONFIG_UI_THEME || 'orange'
this.ui.auth = this.ui.auth || process.env.HOMEBRIDGE_CONFIG_UI_AUTH as 'form' | 'none' || 'form'
this.ui.loginWallpaper = this.ui.loginWallpaper || process.env.HOMEBRIDGE_CONFIG_UI_LOGIN_WALLPAPER || undefined
}
Expand Down
12 changes: 6 additions & 6 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc2d453

Please sign in to comment.