diff --git a/lib/ZwaveClient.ts b/lib/ZwaveClient.ts index 26db1f3a06..5844279830 100644 --- a/lib/ZwaveClient.ts +++ b/lib/ZwaveClient.ts @@ -3187,12 +3187,22 @@ class ZwaveClient extends TypedEventEmitter { async rebuildNodeRoutes(nodeId: number): Promise { if (this.driverReady) { let status: RebuildRoutesStatus = 'pending' + + const node = this.nodes.get(nodeId) + + if (!node) { + throw Error(`Node ${nodeId} not found`) + } + + node.rebuildRoutesProgress = status this.sendToSocket(socketEvents.rebuildRoutesProgress, [ [nodeId, status], ]) const result = await this._driver.controller.rebuildNodeRoutes(nodeId) status = result ? 'done' : 'failed' + + node.rebuildRoutesProgress = status this.sendToSocket(socketEvents.rebuildRoutesProgress, [ [nodeId, status], ]) diff --git a/src/App.vue b/src/App.vue index 57081c9412..653235a89f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -433,7 +433,7 @@ export default { this.startSocket() }, darkMode(val) { - this.$vuetify.theme.dark = val || false + this.$vuetify.theme.dark = !!val }, controllerNode(node) { if (!node) return diff --git a/src/stores/base.js b/src/stores/base.js index 56e2f584d2..e09c4731e9 100644 --- a/src/stores/base.js +++ b/src/stores/base.js @@ -97,7 +97,7 @@ const useBaseStore = defineStore('base', { newConfigVersion: undefined, }, ui: { - darkMode: settings.load('dark', undefined), // do not set a default here, otherwise the watch in App.vue will not trigger the change + darkMode: settings.load('dark', false), navTabs: settings.load('navTabs', false), compactMode: settings.load('compact', false), },