From a96e5e02188d97894e78f3911800168dbd08a97c Mon Sep 17 00:00:00 2001 From: GermanBluefox Date: Tue, 10 Dec 2024 08:23:33 +0000 Subject: [PATCH] Fixed GUI --- README.md | 8 ++++---- io-package.json | 13 ------------- src-admin/src/HmipComponent.jsx | 8 ++++++-- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5991458..2d0d272 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,10 @@ https://forum.iobroker.net/topic/27532/homematic-ip-cloud-access-point-adapter ### **WORK IN PROGRESS** --> ## Changelog -### 1.26.1 (2024-12-09) -* (mcm1957) Adapter requires node.js 20 now -* (dietzm) Added support for Home Control Unit -* (GermanBluefox) Corrected the admin GUI +### **WORK IN PROGRESS** +* (@mcm1957) Adapter requires node.js 20 now +* (@dietzm) Added support for Home Control Unit +* (@GermanBluefox) Corrected the admin GUI ### 1.25.0 (2024-11-08) * (bluefox) Updated packages diff --git a/io-package.json b/io-package.json index 2b1fedd..5c3e2d2 100644 --- a/io-package.json +++ b/io-package.json @@ -3,19 +3,6 @@ "name": "hmip", "version": "1.26.1", "news": { - "1.26.1": { - "en": "Adapter requires node.js 20 now\nAdded support for Home Control Unit\nCorrected the admin GUI", - "de": "Adapter benötigt node.js 20 jetzt\nUnterstützung für Home Control Unit\nKorrektur der Admin GUI", - "ru": "Адаптер требует node.js 20\nДобавлена поддержка для подразделения внутреннего контроля\nИсправлен admin GUI", - "pt": "Adaptador requer node.js 20 agora\nAdicionado suporte para unidade de controle de casa\nCorrigido o GUI de admin", - "nl": "Adapter vereist node.js 20 nu\nOndersteuning toegevoegd voor Home Control Unit\nDe admin GUI gecorrigeerd", - "fr": "Adaptateur nécessite node.js 20 maintenant\nAjout du soutien à l'unité de contrôle à domicile\nCorrection de l'interface graphique administrative", - "it": "Adattatore richiede node.js 20 ora\nAggiunto supporto per Home Control Unit\nCorretto la GUI dell'amministratore", - "es": "Adaptador requiere node.js 20 ahora\nApoyo adicional para la unidad de control de casa\nCorregido el GUI del administrador", - "pl": "Adapter wymaga node.js 20 teraz\nDodano wsparcie dla Home Control Unit\nPoprawiono interfejs administratora", - "uk": "Адаптер вимагає node.js 20 тепер\nДодано підтримку для домашнього управління\nВиправлено графічний інтерфейс адміністратора", - "zh-cn": "适配器现在需要节点20\n增加了对家庭控制股的支助\n纠正了管理界面" - }, "1.25.0": { "en": "Updated packages\nUser prettier for code\nAdded GUI test for the admin component", "de": "Aktualisierte Pakete\nBenutzeroberfläche für Code\nGUI Test für die Admin-Komponente hinzugefügt", diff --git a/src-admin/src/HmipComponent.jsx b/src-admin/src/HmipComponent.jsx index 944bd51..db1967c 100644 --- a/src-admin/src/HmipComponent.jsx +++ b/src-admin/src/HmipComponent.jsx @@ -88,8 +88,12 @@ class HmipComponent extends ConfigGeneric { ConfigGeneric.setValue(this.props.data, 'clientAuthToken', response.clientAuthToken); ConfigGeneric.setValue(this.props.data, 'clientId', response.clientId); - this.props.onChange(this.props.data, undefined, () => - this.props.forceUpdate(['authToken', 'clientAuthToken', 'clientId'], this.props.data)); + this.props.onChange(this.props.data, undefined, () => { + const forceUpdate = this.props.oContext?.forceUpdate || this.props.forceUpdate; + if (forceUpdate) { + forceUpdate(['authToken', 'clientAuthToken', 'clientId'], this.props.data) + } + }); break; } }