summary refs log tree commit diff
path: root/resources/qml/device-verification/NewVerificationRequest.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-05 22:12:10 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-05 22:12:10 +0200
commitbca29a4227a871caac21236c29430b69264018ce (patch)
treedc5bf6b5ecc0ceed9d31d1210fc45693ad295b14 /resources/qml/device-verification/NewVerificationRequest.qml
parentDon't fail on missing key for a device and /rotate-megolm-session command (diff)
downloadnheko-bca29a4227a871caac21236c29430b69264018ce.tar.xz
Make steps in verification flow explicit
Diffstat (limited to 'resources/qml/device-verification/NewVerificationRequest.qml')
-rw-r--r--resources/qml/device-verification/NewVerificationRequest.qml37
1 files changed, 13 insertions, 24 deletions
diff --git a/resources/qml/device-verification/NewVerificationRequest.qml b/resources/qml/device-verification/NewVerificationRequest.qml

index ef730b13..bd25bb90 100644 --- a/resources/qml/device-verification/NewVerificationRequest.qml +++ b/resources/qml/device-verification/NewVerificationRequest.qml
@@ -2,12 +2,11 @@ import QtQuick 2.3 import QtQuick.Controls 2.10 import QtQuick.Layouts 1.10 +import im.nheko 1.0 + Pane { - property string title: qsTr("Sending Device Verification Request") - Component { - id: awaitingVerificationRequestAccept - AwaitingVerificationRequest {} - } + property string title: flow.sender ? qsTr("Send Device Verification Request") : qsTr("Recieved Device Verification Request") + ColumnLayout { spacing: 16 Label { @@ -15,28 +14,20 @@ Pane { Layout.fillHeight: true Layout.fillWidth: true wrapMode: Text.Wrap - text: qsTr("A new device was added.") - color:colors.text - verticalAlignment: Text.AlignVCenter - } - Label { - Layout.maximumWidth: 400 - Layout.fillHeight: true - Layout.fillWidth: true - wrapMode: Text.Wrap - text: qsTr("The device may have been added by you signing in from another client or physical device. To ensure that no malicious user can eavesdrop on your encrypted communications, you should verify the new device.") + text: flow.sender ? + qsTr("To ensure that no malicious user can eavesdrop on your encrypted communications, you can verify this device.") + : qsTr("The device was requested to be verified") color:colors.text verticalAlignment: Text.AlignVCenter } RowLayout { Button { Layout.alignment: Qt.AlignLeft - text: qsTr("Cancel") + text: flow.sender ? qsTr("Cancel") : qsTr("Deny") onClicked: { - deviceVerificationList.remove(tran_id); - flow.deleteFlow(); - dialog.destroy(); + flow.cancel(); + dialog.close(); } } Item { @@ -44,12 +35,10 @@ Pane { } Button { Layout.alignment: Qt.AlignRight - text: qsTr("Start verification") + text: flow.sender ? qsTr("Start verification") : qsTr("Accept") - onClicked: { - stack.replace(awaitingVerificationRequestAccept); - flow.sender ?flow.sendVerificationRequest():flow.startVerificationRequest(); } - } + onClicked: flow.next(); } } } +}