Clean up verification pages a bit

master
Nicolas Werner 4 years ago
parent d4dccc8e36
commit 51964c4fd7
  1. 22
      resources/qml/device-verification/AcceptNewVerificationRequest.qml
  2. 10
      resources/qml/device-verification/AwaitingVerificationConfirmation.qml
  3. 10
      resources/qml/device-verification/AwaitingVerificationRequest.qml
  4. 22
      resources/qml/device-verification/DigitVerification.qml
  5. 20
      resources/qml/device-verification/EmojiVerification.qml
  6. 22
      resources/qml/device-verification/NewVerificationRequest.qml
  7. 12
      resources/qml/device-verification/PartnerAborted.qml
  8. 11
      resources/qml/device-verification/TimedOut.qml
  9. 10
      resources/qml/device-verification/VerificationSuccess.qml

@ -25,15 +25,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("Deny")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
flow.cancelVerification(DeviceVerificationFlow.User);
deviceVerificationList.remove(tran_id);
@ -46,18 +38,10 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("Accept")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
stack.replace(awaitingVerificationRequestAccept);
isRequest?flow.sendVerificationReady():flow.acceptVerificationRequest();
flow.sender ?flow.sendVerificationReady():flow.acceptVerificationRequest();
}
}
}

@ -25,15 +25,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("Cancel")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
flow.cancelVerification(DeviceVerificationFlow.User);
deviceVerificationList.remove(tran_id);

@ -25,15 +25,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("Cancel")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
flow.cancelVerification(DeviceVerificationFlow.User);
deviceVerificationList.remove(tran_id);

@ -43,15 +43,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("They do not match!")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
deviceVerificationList.remove(tran_id);
@ -64,17 +56,9 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("They match!")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: { stack.replace(awaitingVerificationConfirmation); flow.sendVerificationMac(); }
}
}
}
}
}

@ -123,15 +123,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("They do not match!")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS);
deviceVerificationList.remove(tran_id);
@ -144,15 +136,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("They match!")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: { stack.replace(awaitingVerificationConfirmation); flow.sendVerificationMac(); }
}
}

@ -32,15 +32,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignLeft
text: qsTr("Cancel")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
deviceVerificationList.remove(tran_id);
flow.deleteFlow();
@ -53,19 +45,11 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("Start verification")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
stack.replace(awaitingVerificationRequestAccept);
flow.sender ?flow.sendVerificationRequest():flow.startVerificationRequest(); }
}
}
}
}
}

@ -23,15 +23,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("Close")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
deviceVerificationList.remove(tran_id);
dialog.destroy();
@ -39,4 +31,4 @@ Pane {
}
}
}
}
}

@ -21,18 +21,9 @@ Pane {
Layout.fillWidth: true
}
Button {
id: timedOutCancel
Layout.alignment: Qt.AlignRight
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
text: qsTr("Close")
onClicked: {
deviceVerificationList.remove(tran_id);
flow.deleteFlow();

@ -23,15 +23,7 @@ Pane {
Button {
Layout.alignment: Qt.AlignRight
text: qsTr("Close")
palette {
button: "white"
}
contentItem: Text {
text: parent.text
color: "black"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: {
deviceVerificationList.remove(tran_id);
if(flow) flow.deleteFlow();

Loading…
Cancel
Save