node-red-contrib-knx-ultimate 6.2.3-beta.2 → 6.2.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -4
- package/nodes/knxUltimateHueAreaMotion.html +5 -1
- package/nodes/knxUltimateHueBattery.html +5 -1
- package/nodes/knxUltimateHueButton.html +5 -1
- package/nodes/knxUltimateHueCameraMotion.html +5 -1
- package/nodes/knxUltimateHueContactSensor.html +5 -1
- package/nodes/knxUltimateHueController.html +5 -1
- package/nodes/knxUltimateHueHumiditySensor.html +5 -1
- package/nodes/knxUltimateHueLight.html +5 -1
- package/nodes/knxUltimateHueLightSensor.html +5 -1
- package/nodes/knxUltimateHueMotion.html +5 -1
- package/nodes/knxUltimateHuePlug.html +5 -1
- package/nodes/knxUltimateHueScene.html +5 -1
- package/nodes/knxUltimateHueTapDial.html +5 -1
- package/nodes/knxUltimateHueTemperatureSensor.html +5 -1
- package/nodes/knxUltimateHueZigbeeConnectivity.html +5 -1
- package/nodes/knxUltimateHuedevice_software_update.html +5 -1
- package/nodes/locales/de/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/de/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/de/knxUltimateHueButton.html +1 -1
- package/nodes/locales/de/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/de/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/de/knxUltimateHueController.html +3 -3
- package/nodes/locales/de/knxUltimateHueController.json +7 -4
- package/nodes/locales/de/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/de/knxUltimateHueLight.html +1 -1
- package/nodes/locales/de/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/de/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/de/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/de/knxUltimateHueScene.html +1 -1
- package/nodes/locales/de/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/de/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/de/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/de/knxUltimateHuedevice_software_update.html +1 -1
- package/nodes/locales/en/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/en/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/en/knxUltimateHueButton.html +1 -1
- package/nodes/locales/en/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/en/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/en/knxUltimateHueController.html +3 -3
- package/nodes/locales/en/knxUltimateHueController.json +7 -4
- package/nodes/locales/en/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/en/knxUltimateHueLight.html +1 -1
- package/nodes/locales/en/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/en/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/en/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/en/knxUltimateHueScene.html +1 -1
- package/nodes/locales/en/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/en/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/en/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/en/knxUltimateHuedevice_software_update.html +1 -1
- package/nodes/locales/es/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/es/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/es/knxUltimateHueButton.html +1 -1
- package/nodes/locales/es/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/es/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/es/knxUltimateHueController.html +3 -3
- package/nodes/locales/es/knxUltimateHueController.json +7 -4
- package/nodes/locales/es/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/es/knxUltimateHueLight.html +1 -1
- package/nodes/locales/es/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/es/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/es/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/es/knxUltimateHueScene.html +1 -1
- package/nodes/locales/es/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/es/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/es/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/es/knxUltimateHuedevice_software_update.html +1 -1
- package/nodes/locales/fr/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/fr/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/fr/knxUltimateHueButton.html +1 -1
- package/nodes/locales/fr/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/fr/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/fr/knxUltimateHueController.html +3 -3
- package/nodes/locales/fr/knxUltimateHueController.json +7 -4
- package/nodes/locales/fr/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/fr/knxUltimateHueLight.html +1 -1
- package/nodes/locales/fr/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/fr/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/fr/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/fr/knxUltimateHueScene.html +1 -1
- package/nodes/locales/fr/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/fr/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/fr/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/fr/knxUltimateHuedevice_software_update.html +1 -1
- package/nodes/locales/it/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/it/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/it/knxUltimateHueButton.html +1 -1
- package/nodes/locales/it/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/it/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/it/knxUltimateHueController.html +3 -3
- package/nodes/locales/it/knxUltimateHueController.json +7 -4
- package/nodes/locales/it/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/it/knxUltimateHueLight.html +1 -1
- package/nodes/locales/it/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/it/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/it/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/it/knxUltimateHueScene.html +1 -1
- package/nodes/locales/it/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/it/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/it/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/it/knxUltimateHuedevice_software_update.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueAreaMotion.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueBattery.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueButton.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueCameraMotion.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueContactSensor.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueController.html +3 -3
- package/nodes/locales/zh-CN/knxUltimateHueController.json +7 -4
- package/nodes/locales/zh-CN/knxUltimateHueHumiditySensor.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueLight.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueLightSensor.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueMotion.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHuePlug.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueScene.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueTapDial.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHueZigbeeConnectivity.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateHuedevice_software_update.html +1 -1
- package/package.json +1 -1
- package/resources/hueControllerMigrationDialog.js +45 -40
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/markdown" data-help-name="knxUltimateHueScene">
|
|
2
|
-
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。
|
|
2
|
+
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。 此编辑器中带白色文字的高对比度橙色迁移按钮会在本地转换所有旧版 HUE 节点;完成后只会打开一封可编辑的邮件草稿。邮件绝不会自动发送。流程结束后,Node-RED 的固定消息会一直显示,直到您点击“确定”,并提供一个可选支持按钮;只有点击该按钮时才会打开捐赠页面。 开始前,请<a href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer">在 YouTube 上观看说明视频</a>。</p>
|
|
3
3
|
**Hue Scene** 节点将 Hue 场景发布到 KNX,并且可以把 Hue 的原始事件发送到 Node-RED 流程。场景字段支持自动补全;在网桥中新增场景后,请点击刷新图标更新列表。
|
|
4
4
|
|
|
5
5
|
### 选项卡概览
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/markdown" data-help-name="knxUltimateHueTapDial">
|
|
2
|
-
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。
|
|
2
|
+
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。 此编辑器中带白色文字的高对比度橙色迁移按钮会在本地转换所有旧版 HUE 节点;完成后只会打开一封可编辑的邮件草稿。邮件绝不会自动发送。流程结束后,Node-RED 的固定消息会一直显示,直到您点击“确定”,并提供一个可选支持按钮;只有点击该按钮时才会打开捐赠页面。 开始前,请<a href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer">在 YouTube 上观看说明视频</a>。</p>
|
|
3
3
|
**Hue Tap Dial** 节点将 Tap Dial 的旋转服务映射到 KNX,并把原始 Hue 事件发送到 Node-RED 流程。配对新设备后,请点击设备字段旁的刷新图标。
|
|
4
4
|
|
|
5
5
|
### 选项卡
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/markdown" data-help-name="knxUltimateHueTemperatureSensor">
|
|
2
|
-
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。
|
|
2
|
+
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。 此编辑器中带白色文字的高对比度橙色迁移按钮会在本地转换所有旧版 HUE 节点;完成后只会打开一封可编辑的邮件草稿。邮件绝不会自动发送。流程结束后,Node-RED 的固定消息会一直显示,直到您点击“确定”,并提供一个可选支持按钮;只有点击该按钮时才会打开捐赠页面。 开始前,请<a href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer">在 YouTube 上观看说明视频</a>。</p>
|
|
3
3
|
<p>此节点读取 HUE 温度传感器的温度(°C),并将其映射到 KNX。</p>
|
|
4
4
|
|
|
5
5
|
在 GA 字段(名称或组地址)中输入以关联 KNX GA;输入时会显示设备建议。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/markdown" data-help-name="knxUltimateHueZigbeeConnectivity">
|
|
2
|
-
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。
|
|
2
|
+
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。 此编辑器中带白色文字的高对比度橙色迁移按钮会在本地转换所有旧版 HUE 节点;完成后只会打开一封可编辑的邮件草稿。邮件绝不会自动发送。流程结束后,Node-RED 的固定消息会一直显示,直到您点击“确定”,并提供一个可选支持按钮;只有点击该按钮时才会打开捐赠页面。 开始前,请<a href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer">在 YouTube 上观看说明视频</a>。</p>
|
|
3
3
|
<p>该节点从 HUE 设备读取 Zigbee 连接状态,并发布到 KNX。</p>
|
|
4
4
|
|
|
5
5
|
在 GA 字段输入 KNX 设备名或组地址,输入时会自动联想。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script type="text/markdown" data-help-name="knxUltimateHuedevice_software_update">
|
|
2
|
-
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。
|
|
2
|
+
<p><strong>已弃用:</strong>此专用 HUE 节点仍可用于现有流程。新项目请使用 <strong>HUE Controller</strong>。旧版节点会在节点面板和画布上标记为 <code>(deprecated)</code>,颜色比 HUE Controller 更浅,编辑器顶部也会显示迁移提示。 此编辑器中带白色文字的高对比度橙色迁移按钮会在本地转换所有旧版 HUE 节点;完成后只会打开一封可编辑的邮件草稿。邮件绝不会自动发送。流程结束后,Node-RED 的固定消息会一直显示,直到您点击“确定”,并提供一个可选支持按钮;只有点击该按钮时才会打开捐赠页面。 开始前,请<a href="https://youtu.be/f0Evf2QFI7c" target="_blank" rel="noopener noreferrer">在 YouTube 上观看说明视频</a>。</p>
|
|
3
3
|
<p>该节点监控 HUE 设备的软件更新状态,并发布到 KNX。</p>
|
|
4
4
|
|
|
5
5
|
开始在GA字段中键入KNX设备的名称或组地址,可用的设备开始显示
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=20.18.1"
|
|
5
5
|
},
|
|
6
|
-
"version": "6.2.3-beta.
|
|
6
|
+
"version": "6.2.3-beta.3",
|
|
7
7
|
"description": "KNX Ultimate is the most advanced KNX integration for Node-RED, providing secure KNX/IP communication, routing, ETS project import, Philips Hue, Matter Controller and Matter Bridge (control matter device via KNX and expose KNX GA via Matter), MQTT, diagnostics with AI, virtual devices, and powerful automation nodes. Build professional, reliable, and scalable smart home and building automation projects with minimal effort.",
|
|
8
8
|
"files": [
|
|
9
9
|
"nodes/",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
const EVENT_NAMESPACE = '.knxUltimateHueControllerMigrationDialog'
|
|
14
14
|
const BUTTON_SELECTOR = '.hue-legacy-migrate-flow'
|
|
15
|
+
const BUTTON_STYLE_ID = 'knxUltimateHueLegacyMigrationButtonStyle'
|
|
15
16
|
const I18N_PREFIX = 'node-red-contrib-knx-ultimate/knxUltimateHueController:knxUltimateHueController.'
|
|
16
17
|
let closeActiveDialog = function () {}
|
|
17
18
|
|
|
@@ -35,28 +36,38 @@
|
|
|
35
36
|
if ($cancel.length) $cancel.trigger('click')
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
function ensureLegacyButtonStyle ($) {
|
|
40
|
+
if ($(`#${BUTTON_STYLE_ID}`).length) return
|
|
41
|
+
$('<style></style>')
|
|
42
|
+
.attr('id', BUTTON_STYLE_ID)
|
|
43
|
+
.text(`
|
|
44
|
+
.hue-legacy-migrate-flow.red-ui-button,
|
|
45
|
+
.hue-legacy-migrate-flow.red-ui-button:hover,
|
|
46
|
+
.hue-legacy-migrate-flow.red-ui-button:active,
|
|
47
|
+
.hue-legacy-migrate-flow.red-ui-button:focus,
|
|
48
|
+
.hue-legacy-migrate-flow.red-ui-button > i,
|
|
49
|
+
.hue-legacy-migrate-flow.red-ui-button > span {
|
|
50
|
+
color: #ffffff !important;
|
|
51
|
+
}
|
|
52
|
+
`)
|
|
53
|
+
.appendTo('head')
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
function
|
|
56
|
+
function openDonationPage (RED, translate, windowObject, donationUrl) {
|
|
52
57
|
try {
|
|
53
|
-
if (
|
|
54
|
-
|
|
58
|
+
if (!windowObject || typeof windowObject.open !== 'function') throw new Error('Browser window opening is unavailable')
|
|
59
|
+
const donationWindow = windowObject.open(donationUrl, '_blank', 'noopener,noreferrer')
|
|
60
|
+
if (!donationWindow) throw new Error('The browser blocked the donation window')
|
|
61
|
+
} catch (error) {
|
|
62
|
+
if (RED && typeof RED.notify === 'function') {
|
|
63
|
+
RED.notify(translate('migration_donation_failed', 'The donation page could not be opened. You can try again.'), 'warning')
|
|
64
|
+
}
|
|
65
|
+
}
|
|
55
66
|
}
|
|
56
67
|
|
|
57
|
-
function showCompletionMessage (RED, translate, convertedCount) {
|
|
68
|
+
function showCompletionMessage (RED, translate, convertedCount, windowObject, donationUrl) {
|
|
58
69
|
if (!RED || typeof RED.notify !== 'function') return
|
|
59
|
-
const message = translate('migration_success', 'Process finished. {{count}} legacy HUE nodes were converted. Inspect every modified node, including its function, configuration, pins and wiring, before clicking Deploy.')
|
|
70
|
+
const message = translate('migration_success', 'Process finished. {{count}} legacy HUE nodes were converted. Inspect every modified node, including its function, configuration, pins and wiring, before clicking Deploy. If this conversion saved you time, you can support the continued development of KNX Ultimate with the optional button below.')
|
|
60
71
|
.replace('{{count}}', String(convertedCount))
|
|
61
72
|
let notification
|
|
62
73
|
try {
|
|
@@ -64,13 +75,22 @@
|
|
|
64
75
|
modal: true,
|
|
65
76
|
fixed: true,
|
|
66
77
|
type: 'success',
|
|
67
|
-
buttons: [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
buttons: [
|
|
79
|
+
{
|
|
80
|
+
text: translate('migration_donate', 'Support KNX Ultimate ❤️'),
|
|
81
|
+
class: 'hue-controller-migration-donate',
|
|
82
|
+
click () {
|
|
83
|
+
openDonationPage(RED, translate, windowObject, donationUrl)
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
text: translate('migration_ok', 'OK'),
|
|
88
|
+
class: 'primary',
|
|
89
|
+
click () {
|
|
90
|
+
if (notification && typeof notification.close === 'function') notification.close()
|
|
91
|
+
}
|
|
72
92
|
}
|
|
73
|
-
|
|
93
|
+
]
|
|
74
94
|
})
|
|
75
95
|
} catch (error) { /* the conversion is already complete */ }
|
|
76
96
|
}
|
|
@@ -114,7 +134,7 @@
|
|
|
114
134
|
.css({ marginBottom: '10px', padding: '8px 10px', borderLeft: '4px solid #2980b9', background: '#eaf4fb' })
|
|
115
135
|
.appendTo($dialog)
|
|
116
136
|
$('<div class="hue-controller-migration-email"></div>')
|
|
117
|
-
.text(translate('migration_email_notice', 'After conversion, your email app will open an editable draft addressed to the author without navigating away from Node-RED
|
|
137
|
+
.text(translate('migration_email_notice', 'After conversion, your email app will open an editable draft addressed to the author without navigating away from Node-RED. The draft contains only the number of converted nodes and space for optional notes; nothing is sent automatically. The final Node-RED message will offer an optional button to support KNX Ultimate.'))
|
|
118
138
|
.css({ marginBottom: '10px' })
|
|
119
139
|
.appendTo($dialog)
|
|
120
140
|
$('<div class="form-tips hue-controller-migration-backup"></div>')
|
|
@@ -144,10 +164,8 @@
|
|
|
144
164
|
if (running) return
|
|
145
165
|
running = true
|
|
146
166
|
$convert.prop('disabled', true)
|
|
147
|
-
let donationWindow
|
|
148
167
|
try {
|
|
149
168
|
migrationApi.createLocalMigrationPatches(legacyNodes)
|
|
150
|
-
donationWindow = reserveDonationWindow(windowObject)
|
|
151
169
|
closeDialog()
|
|
152
170
|
closeEditorTray(RED, $)
|
|
153
171
|
windowObject.setTimeout(() => {
|
|
@@ -155,23 +173,10 @@
|
|
|
155
173
|
try {
|
|
156
174
|
convertedCount = migrationApi.applyLocalMigration(RED, legacyNodes)
|
|
157
175
|
} catch (error) {
|
|
158
|
-
closeDonationWindow(donationWindow)
|
|
159
176
|
const message = error && error.message ? error.message : String(error)
|
|
160
177
|
RED.notify(`${translate('migration_failed', 'HUE migration failed; the flow was not changed:')} ${message}`, 'error')
|
|
161
178
|
return
|
|
162
179
|
}
|
|
163
|
-
try {
|
|
164
|
-
if (donationWindow && !donationWindow.closed && donationWindow.location) {
|
|
165
|
-
donationWindow.location.href = migrationApi.MIGRATION_DONATION_URL
|
|
166
|
-
} else if (typeof windowObject.open === 'function') {
|
|
167
|
-
const opened = windowObject.open(migrationApi.MIGRATION_DONATION_URL, '_blank', 'noopener,noreferrer')
|
|
168
|
-
if (!opened) throw new Error('The browser blocked the donation window')
|
|
169
|
-
} else {
|
|
170
|
-
throw new Error('Browser window opening is unavailable')
|
|
171
|
-
}
|
|
172
|
-
} catch (error) {
|
|
173
|
-
RED.notify(translate('migration_donation_failed', 'The nodes were converted, but the donation page could not be opened.'), 'warning')
|
|
174
|
-
}
|
|
175
180
|
try {
|
|
176
181
|
const mailto = migrationApi.createUsageMailto(convertedCount, {
|
|
177
182
|
subject: translate('migration_email_subject', 'KNX Ultimate - legacy HUE conversion used'),
|
|
@@ -184,10 +189,9 @@
|
|
|
184
189
|
} catch (error) {
|
|
185
190
|
RED.notify(translate('migration_email_failed', 'The nodes were converted, but the email draft could not be opened.'), 'warning')
|
|
186
191
|
}
|
|
187
|
-
showCompletionMessage(RED, translate, convertedCount)
|
|
192
|
+
showCompletionMessage(RED, translate, convertedCount, windowObject, migrationApi.MIGRATION_DONATION_URL)
|
|
188
193
|
}, 0)
|
|
189
194
|
} catch (error) {
|
|
190
|
-
closeDonationWindow(donationWindow)
|
|
191
195
|
running = false
|
|
192
196
|
$convert.prop('disabled', false)
|
|
193
197
|
const message = error && error.message ? error.message : String(error)
|
|
@@ -222,6 +226,7 @@
|
|
|
222
226
|
|
|
223
227
|
function installLegacyButton (RED, $, windowObject, documentObject) {
|
|
224
228
|
if (!RED || !$ || !documentObject) return
|
|
229
|
+
ensureLegacyButtonStyle($)
|
|
225
230
|
const $document = $(documentObject)
|
|
226
231
|
$document.off(`click${EVENT_NAMESPACE}`, BUTTON_SELECTOR)
|
|
227
232
|
$document.on(`click${EVENT_NAMESPACE}`, BUTTON_SELECTOR, (event) => {
|