Add a confirm dialog before resetting ZigBee/Z-Wave controllers

This commit is contained in:
Michael Zanetti 2022-08-22 22:47:26 +02:00
parent 77def7ada5
commit e33ddb45bd
10 changed files with 245 additions and 5 deletions

View File

@ -7558,6 +7558,18 @@ Bitte benutze diese Funktion nur wenn Du sicher bist, dass es das ist was Du mö
<source>Factory reset controller</source>
<translation>Adapter zurücksetzen</translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation>Bist Du sicher, dass der Controller zurückgesetzt werden soll? Das Netzwerk wird dabei neu erstellt und alle verknüpften Geräte werden aus dem System entfernt.</translation>
</message>
<message>
<source>Reset controller</source>
<translation>Controller zurücksetzen</translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation>Bist Du sicher, dass das Netzwerk und alle verknüpften Geräte aus dem System enfernt werden sollen?</translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7972,6 +7984,18 @@ Bitte benutze diese Funktion nur wenn Du sicher bist, dass es das ist was Du mö
<source>Factory reset controller</source>
<translation>Adapter zurücksetzen</translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation>Bist Du sicher, dass der Controller zurückgesetzt werden soll? Das Netzwerk wird dabei neu erstellt und alle verknüpften Geräte werden aus dem System entfernt.</translation>
</message>
<message>
<source>Reset controller</source>
<translation>Controller zurücksetzen</translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation>Bist Du sicher, dass das Netzwerk und alle verknüpften Geräte aus dem System enfernt werden sollen?</translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7171,6 +7171,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7553,6 +7565,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7171,6 +7171,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7553,6 +7565,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7226,6 +7226,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7608,6 +7620,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7344,6 +7344,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7732,6 +7744,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7229,6 +7229,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7615,6 +7627,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7436,6 +7436,18 @@ Lütfen bunu istediğinizden eminseniz kullanın ve yayınlanmamış kanalları
<source>Factory reset controller</source>
<translation type="unfinished">Fabrika ayarlarına sıfırlama denetleyicisi</translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7832,6 +7844,18 @@ Lütfen bunu istediğinizden eminseniz kullanın ve yayınlanmamış kanalları
<source>Factory reset controller</source>
<translation>Fabrika ayarlarına sıfırlama denetleyicisi</translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -7153,6 +7153,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZWaveSettingsPage</name>
@ -7533,6 +7545,18 @@ Please only use this if you are sure you want this and consider reporting the is
<source>Factory reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset controller</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Are you sure you want to remove the network and all associated devices from the system?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ZigbeeSettingsPage</name>

View File

@ -145,8 +145,20 @@ SettingsPageBase {
Layout.rightMargin: app.margins
text: qsTr("Remove network")
onClicked: {
root.zigbeeManager.removeNetwork(root.network.networkUuid)
root.exit()
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
var text = qsTr("Are you sure you want to remove the network and all associated devices from the system?")
var popup = dialog.createObject(app,
{
headerIcon: "../images/dialog-warning-symbolic.svg",
title: qsTr("Remove network"),
text: text,
standardButtons: Dialog.Ok | Dialog.Cancel
});
popup.open();
popup.accepted.connect(function() {
root.zigbeeManager.removeNetwork(root.network.networkUuid)
root.exit()
})
}
}
@ -156,7 +168,19 @@ SettingsPageBase {
Layout.rightMargin: app.margins
text: qsTr("Factory reset controller")
onClicked: {
root.zigbeeManager.factoryResetNetwork(root.network.networkUuid)
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
var text = qsTr("Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.")
var popup = dialog.createObject(app,
{
headerIcon: "../images/dialog-warning-symbolic.svg",
title: qsTr("Reset controller"),
text: text,
standardButtons: Dialog.Ok | Dialog.Cancel
});
popup.open();
popup.accepted.connect(function() {
root.zigbeeManager.factoryResetNetwork(root.network.networkUuid)
})
}
}
}

View File

@ -165,7 +165,19 @@ SettingsPageBase {
Layout.rightMargin: app.margins
text: qsTr("Remove network")
onClicked: {
d.pendingCommandId = root.zwaveManager.removeNetwork(root.network.networkUuid)
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
var text = qsTr("Are you sure you want to remove the network and all associated devices from the system?")
var popup = dialog.createObject(app,
{
headerIcon: "../images/dialog-warning-symbolic.svg",
title: qsTr("Remove network"),
text: text,
standardButtons: Dialog.Ok | Dialog.Cancel
});
popup.open();
popup.accepted.connect(function() {
d.pendingCommandId = root.zwaveManager.removeNetwork(root.network.networkUuid)
})
}
}
@ -175,7 +187,19 @@ SettingsPageBase {
Layout.rightMargin: app.margins
text: qsTr("Factory reset controller")
onClicked: {
d.pendingCommandId = root.zwaveManager.factoryResetNetwork(root.network.networkUuid)
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
var text = qsTr("Are you sure you want to factory reset the controller? This will recreate the network and remove all associated devices from the system.")
var popup = dialog.createObject(app,
{
headerIcon: "../images/dialog-warning-symbolic.svg",
title: qsTr("Reset controller"),
text: text,
standardButtons: Dialog.Ok | Dialog.Cancel
});
popup.open();
popup.accepted.connect(function() {
d.pendingCommandId = root.zwaveManager.factoryResetNetwork(root.network.networkUuid)
})
}
}
}