Skip to content

Commit

Permalink
general improvements across the ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Jan 8, 2025
1 parent df2eb5d commit c81fddd
Show file tree
Hide file tree
Showing 283 changed files with 7,289 additions and 5,854 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,44 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
- further improvements to plugin search
- implement and allow switching to scoped plugins
- merge plugin info and verified modals
- condensing plugin card into title + three lines of description
- consistent formatting of child bridge names across the ui
- general improvements across the ui
- status page:
- individual widget setting form design made consistent with other forms
- added pairing status to qr code widget
- plugins page:
- visual improvements to plugin child bridge settings modal
- allow plugins to disable/enable the save button in custom uis (see below section)
- allow configuring [multiple accessories on the same child bridge](https://github.com/homebridge/homebridge/wiki/Child-Bridges#multiple-accessories-on-the-same-child-bridge) via the ui
- accessories page:
- changed accessory spanner icon to info icon (more descriptive)
- accessory info modal redesigned and provides more info where possible like the accessory UUID (including a link to remove from the cache)
- added support modal with some info about rooms and accessories (visible on desktop)
- json config page:
- redesigned restore modal to be more consistent with other modals
- settings page:
- chevron icons replaced with arrow-right icons
- removed restore modal from settings page and is accessible from the backup modal
- backup modal redesigned to be more consistent with other modals
- added new display -> menu mode setting which allows keeping the side menu from expanding out on desktop
- redesigned and improved accessories and bridges sections and modals
- users page:
- add user and edit user modals redesigned to be more consistent with other modals
- user card updated with icon buttons for edit/delete rather than text buttons

### Plugin Custom UI Changes

The UI has recently been updated with `@homebridge/plugin-ui-utils` @ `v2.0.0`, which includes a new feature to allow plugin developers to dynamically enable and disable the `Save` button in the custom UI modal.
Two new methods have been added for this purpose:

- `homebridge.disableSaveButton()`
- `homebridge.enableSaveButton()`

Developers: to maintain compatibility with older versions of the Homebridge UI, it is recommended to check if the methods exist before calling them in your custom UIs:

- `homebridge.disableSaveButton?.()`
- `homebridge.enableSaveButton?.()`

### Other Changes

Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

Pull requests are welcome from everyone.

This project is written in [TypeScript](https://www.typescriptlang.org/) and uses [Nest.js](https://nestjs.com/) for the server and [Angular](https://angular.io/) for the client UI.
This project is written in [TypeScript](https://www.typescriptlang.org/) and uses [Nest.js](https://nestjs.com/) for the server and [Angular](https://angular.dev/) for the client UI.

## Getting Setup

_Note: The Raspberry Pi and similar boards do not meet the memory or CPU requirements required to set up the development environment._
> [!NOTE]
> The Raspberry Pi and similar boards do not meet the memory or CPU requirements required to set up the development environment.
First, remove any globally installed versions of `homebridge-config-ui-x` you may have installed on your development machine:

Expand Down Expand Up @@ -38,7 +39,7 @@ Symlink your development directory to global:
npm link
```

If you don't have homebridge installed already run:
If you don't have Homebridge installed already run:

```sh
npm install -g homebridge
Expand All @@ -52,7 +53,7 @@ This will start the Angular development server on port `4200` and a standalone s
npm run watch
```

You should now be able to navigate to `https://localhost:4200` in your browser which will connect to your `homebridge` instance running on port `8581`. The UI will automatically reload whenever you make changes to the code.
You should now be able to navigate to `https://localhost:4200` in your browser which will connect to your Homebridge instance running on port `8581`. The UI will automatically reload whenever you make changes to the code.

## Running Tests

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023-2024 Homebridge
Copyright (c) 2023-2025 Homebridge
Copyright (c) 2017-2023 oznu <[email protected]>
Copyright (c) 2017 Michael Kellsy

Expand Down
56 changes: 38 additions & 18 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,34 @@
}
]
},
"menuMode": {
"title": "Menu Mode",
"description": "Modes for the UI side menu.",
"type": "string",
"default": "default",
"oneOf": [
{
"title": "Default",
"enum": [
"default"
]
},
{
"title": "Freeze",
"enum": [
"freeze"
]
}
]
},
"restart": {
"title": "Custom Restart Command",
"type": "string",
"description": "If no restart command is set the process will terminate with a non-zero exit code.",
"placeholder": "eg. sudo systemctl restart homebridge"
},
"temp": {
"title": "Path to OS Temp File",
"title": "OS Temp File Path",
"type": "string",
"placeholder": "eg. /sys/class/thermal/thermal_zone0/temp",
"description": "If you are running Homebridge on a Raspberry Pi, you can enter the path to the OS temp file here. This will display the current temperature on the Homebridge status page."
Expand Down Expand Up @@ -372,7 +392,7 @@
]
},
"loginWallpaper": {
"title": "Path to Login Wallpaper Image File",
"title": "Login Wallpaper Path",
"description": "The full path to the .jpg file.",
"type": "string",
"placeholder": "eg. /home/pi/mywallpaper.jpg"
Expand All @@ -389,19 +409,19 @@
"placeholder": "eg. /usr/local/lib/node_modules/homebridge"
},
"noFork": {
"title": "Do not run the Config UI web server in a separate process/thread",
"title": "Do not run the UI server in a separate process/thread",
"type": "boolean",
"description": "If you are running Homebridge in a container, you may need to enable this option."
},
"host": {
"title": "Host IP Address",
"type": "string",
"pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
"description": "The host ip address to listen on. In most cases this will be '::' or '0.0.0.0'",
"description": "The host IP address to listen on. In most cases this will be '::' or '0.0.0.0'.",
"placeholder": "eg. 0.0.0.0"
},
"debug": {
"title": " Enable / disable debug level logging",
"title": "Enable Debug Logging",
"type": "boolean",
"description": "If enabled, the Homebridge UI will log debug level messages to the console."
},
Expand All @@ -411,7 +431,7 @@
"description": "If you are running Homebridge in a container, you may need to enable this option."
},
"sessionTimeout": {
"title": "Session Timeout (in seconds)",
"title": "Session Timeout (Seconds)",
"type": "integer",
"placeholder": 28800,
"minimum": 600,
Expand Down Expand Up @@ -491,14 +511,14 @@
},
"tail": {
"type": "string",
"description": "Depreciated",
"description": "Depreciated.",
"condition": {
"functionBody": "return (model.log && (model.log.method==='custom' || model.log.method==='systemd' || model.log.method==='file'))"
}
},
"systemd": {
"type": "string",
"description": "Depreciated",
"description": "Depreciated.",
"condition": {
"functionBody": "return (model.log && (model.log.method==='custom' || model.log.method==='systemd' || model.log.method==='file'))"
}
Expand All @@ -524,19 +544,19 @@
"description": "The SSL settings for the Homebridge UI.",
"properties": {
"key": {
"title": "Path To Private Key",
"title": "Private Key Path",
"type": "string",
"description": "The full path to the private key file.",
"placeholder": "eg. /Users/homebridge/.homebridge/certs/server.key"
},
"cert": {
"title": "Path To Certificate",
"title": "Certificate Path",
"type": "string",
"description": "The full path to the certificate file.",
"placeholder": "eg. /Users/homebridge/.homebridge/certs/server.crt"
},
"pfx": {
"title": "Path To PKCS#12 Certificate",
"title": "PKCS#12 Certificate Path",
"type": "string",
"description": "The full path to the PKCS#12 certificate file.",
"placeholder": "eg. /Users/homebridge/.homebridge/certs/server.pfx"
Expand All @@ -555,14 +575,14 @@
"description": "The accessory control settings for the Homebridge UI.",
"properties": {
"debug": {
"title": " Enable / disable debug level logging for accessory control via the web UI",
"title": "Enable Accessory Control Debug Logging",
"type": "boolean",
"description": "If enabled, the Homebridge UI will log debug level messages to the console."
},
"instanceBlacklist": {
"title": "Blacklisted Instances",
"title": "Blacklisted Bridges/Instances",
"type": "array",
"description": "A list of instances that should not be controlled via the web UI.",
"description": "A list of instances (or bridge usernames) that should not be controlled via the web UI.",
"placeholder": "eg. 00:00:00:00:00:00",
"items": {
"title": "Instance Username",
Expand Down Expand Up @@ -599,8 +619,8 @@
"description": "When running behind a reverse proxy you may need to enter the hostname you use to access the UI."
},
"scheduledBackupPath": {
"title": "Scheduled backup destination path",
"description": "The full path to where the service should save daily scheduled backups archives",
"title": "Scheduled Backup Destination",
"description": "The full path to where the service should save daily scheduled backups archives.",
"type": "string",
"placeholder": "eg. /home/pi/homebridge-backups",
"condition": {
Expand All @@ -610,12 +630,12 @@
"scheduledBackupDisable": {
"title": "Disable Scheduled Backups",
"type": "boolean",
"description": "When enabled, the Homebridge UI will not create daily scheduled backups"
"description": "When enabled, the Homebridge UI will not create daily scheduled backups."
},
"disableServerMetricsMonitoring": {
"title": "Disable Server Metrics Monitoring",
"type": "boolean",
"description": "When enabled, the Homebridge UI will not collect or report cpu / memory stats"
"description": "When enabled, the Homebridge UI will not collect or report CPU or memory stats."
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions scripts/lang-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ async function main() {
const translationStrings = await readJson(langPath)

if (lang !== 'en.json') {
// find any keys in the main file that are not in the translation file, and add
// Find any keys in the main file that are not in the translation file, and add
for (const [key, value] of Object.entries(main)) {
if (!Object.prototype.hasOwnProperty.call(translationStrings, key)) {
translationStrings[key] = value
}
}

// find any keys in the translation file that are not in the main file, and remove
// Find any keys in the translation file that are not in the main file, and remove
for (const key of Object.keys(translationStrings)) {
if (!Object.prototype.hasOwnProperty.call(main, key)) {
delete translationStrings[key]
}
}
}

// sort keys
// Sort keys
const ordered = {}
Object.keys(translationStrings).sort().forEach((key) => {
ordered[key] = translationStrings[key]
Expand All @@ -100,4 +100,4 @@ async function main() {
}

// Call the main function
main().catch(console.error)
main().catch(error => console.error(error))
Loading

0 comments on commit c81fddd

Please sign in to comment.