|
|
@ -2,23 +2,29 @@ import QtQuick 2.3 |
|
|
|
import QtQuick.Controls 2.10 |
|
|
|
import QtQuick.Controls 2.10 |
|
|
|
import QtQuick.Layouts 1.10 |
|
|
|
import QtQuick.Layouts 1.10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import im.nheko 1.0 |
|
|
|
|
|
|
|
|
|
|
|
Pane { |
|
|
|
Pane { |
|
|
|
property string title: qsTr("Verification timed out") |
|
|
|
property string title: qsTr("Verification failed") |
|
|
|
ColumnLayout { |
|
|
|
ColumnLayout { |
|
|
|
spacing: 16 |
|
|
|
spacing: 16 |
|
|
|
Text { |
|
|
|
Text { |
|
|
|
|
|
|
|
id: content |
|
|
|
|
|
|
|
|
|
|
|
Layout.maximumWidth: 400 |
|
|
|
Layout.maximumWidth: 400 |
|
|
|
Layout.fillHeight: true |
|
|
|
Layout.fillHeight: true |
|
|
|
Layout.fillWidth: true |
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
|
|
wrapMode: Text.Wrap |
|
|
|
wrapMode: Text.Wrap |
|
|
|
id: content |
|
|
|
|
|
|
|
text: switch (flow.error) { |
|
|
|
text: switch (flow.error) { |
|
|
|
case VerificationStatus.UnknownMethod: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.UnknownMethod: return qsTr("Other client does not support our verification protocol.") |
|
|
|
case VerificationStatus.MismatchedCommitment: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.MismatchedCommitment: |
|
|
|
case VerificationStatus.MismatchedSAS: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.MismatchedSAS: |
|
|
|
case VerificationStatus.KeyMismatch: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.KeyMismatch: return qsTr("Key mismatch detected!") |
|
|
|
case VerificationStatus.Timeout: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.Timeout: return qsTr("Device verification timed out.") |
|
|
|
case VerificationStatus.OutOfOrder: return qsTr("Device verification timed out.") |
|
|
|
case DeviceVerificationFlow.User: return qsTr("Other party canceled the verification.") |
|
|
|
|
|
|
|
case DeviceVerificationFlow.OutOfOrder: return qsTr("Device verification timed out.") |
|
|
|
|
|
|
|
default: return "Unknown verification error."; |
|
|
|
} |
|
|
|
} |
|
|
|
color:colors.text |
|
|
|
color:colors.text |
|
|
|
verticalAlignment: Text.AlignVCenter |
|
|
|
verticalAlignment: Text.AlignVCenter |
|
|
@ -31,11 +37,7 @@ Pane { |
|
|
|
Layout.alignment: Qt.AlignRight |
|
|
|
Layout.alignment: Qt.AlignRight |
|
|
|
text: qsTr("Close") |
|
|
|
text: qsTr("Close") |
|
|
|
|
|
|
|
|
|
|
|
onClicked: { |
|
|
|
onClicked: dialog.close() |
|
|
|
deviceVerificationList.remove(tran_id); |
|
|
|
|
|
|
|
flow.deleteFlow(); |
|
|
|
|
|
|
|
dialog.close() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|