diff --git a/nymea-app/resources.qrc b/nymea-app/resources.qrc index 7dececf7..394050fa 100644 --- a/nymea-app/resources.qrc +++ b/nymea-app/resources.qrc @@ -130,6 +130,7 @@ ui/images/dialog-error-symbolic.svg ui/images/send.svg ui/images/attention.svg + ui/images/question.svg ui/devicepages/InputTriggerDevicePage.qml ui/images/clock-app-symbolic.svg ui/devicepages/StateLogPage.qml diff --git a/nymea-app/ui/ConnectPage.qml b/nymea-app/ui/ConnectPage.qml index 4edf95ee..ccb0ac4e 100644 --- a/nymea-app/ui/ConnectPage.qml +++ b/nymea-app/ui/ConnectPage.qml @@ -312,7 +312,7 @@ Page { running: parent.visible } Label { - text: qsTr("Trying to connect to %1...").arg(Engine.connection.url) + text: qsTr("Connecting to
%1").arg(Engine.connection.url) font.pixelSize: app.largeFont Layout.fillWidth: true wrapMode: Text.WordWrap diff --git a/nymea-app/ui/images/question.svg b/nymea-app/ui/images/question.svg new file mode 100644 index 00000000..efeda013 --- /dev/null +++ b/nymea-app/ui/images/question.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/nymea-app/ui/magic/EditRulePage.qml b/nymea-app/ui/magic/EditRulePage.qml index 138e2f98..38fff95c 100644 --- a/nymea-app/ui/magic/EditRulePage.qml +++ b/nymea-app/ui/magic/EditRulePage.qml @@ -207,7 +207,18 @@ Page { header: GuhHeader { text: root.rule.name.length === 0 ? qsTr("Add new magic") : qsTr("Edit %1").arg(root.rule.name) - onBackPressed: root.cancel() + onBackPressed: { + var component = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml")); + var popup = component.createObject(root, {headerIcon: "../images/question.svg", + title: qsTr("Cancel?"), + text: qsTr("Any changes to the rule will be lost."), + standardButtons: Dialog.Yes | Dialog.No + }) + popup.accepted.connect(function() { + root.cancel(); + }) + popup.open(); + } HeaderButton { imageSource: "../images/tick.svg"