forked from mirror/nheko
parent
517a126a44
commit
1a029112d9
@ -1,39 +1,46 @@ |
|||||||
import QtQuick 2.3 |
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 |
import im.nheko 1.0 |
||||||
|
|
||||||
Pane { |
Pane { |
||||||
property string title: qsTr("Awaiting Confirmation") |
property string title: qsTr("Awaiting Confirmation") |
||||||
|
|
||||||
ColumnLayout { |
ColumnLayout { |
||||||
spacing: 16 |
spacing: 16 |
||||||
|
|
||||||
Label { |
Label { |
||||||
|
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: qsTr("Waiting for other side to complete verification.") |
text: qsTr("Waiting for other side to complete verification.") |
||||||
color: colors.text |
color: colors.text |
||||||
verticalAlignment: Text.AlignVCenter |
verticalAlignment: Text.AlignVCenter |
||||||
} |
} |
||||||
|
|
||||||
BusyIndicator { |
BusyIndicator { |
||||||
Layout.alignment: Qt.AlignHCenter |
Layout.alignment: Qt.AlignHCenter |
||||||
} |
} |
||||||
|
|
||||||
RowLayout { |
RowLayout { |
||||||
Button { |
Button { |
||||||
Layout.alignment: Qt.AlignLeft |
Layout.alignment: Qt.AlignLeft |
||||||
text: qsTr("Cancel") |
text: qsTr("Cancel") |
||||||
|
|
||||||
onClicked: { |
onClicked: { |
||||||
flow.cancel(); |
flow.cancel(); |
||||||
dialog.close(); |
dialog.close(); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
Item { |
Item { |
||||||
Layout.fillWidth: true |
Layout.fillWidth: true |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,44 +1,56 @@ |
|||||||
import QtQuick 2.3 |
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 |
import im.nheko 1.0 |
||||||
|
|
||||||
Pane { |
Pane { |
||||||
property string title: qsTr("Verification failed") |
property string title: qsTr("Verification failed") |
||||||
|
|
||||||
ColumnLayout { |
ColumnLayout { |
||||||
spacing: 16 |
spacing: 16 |
||||||
|
|
||||||
Text { |
Text { |
||||||
id: content |
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 |
||||||
text: switch (flow.error) { |
text: { |
||||||
case DeviceVerificationFlow.UnknownMethod: return qsTr("Other client does not support our verification protocol.") |
switch (flow.error) { |
||||||
|
case DeviceVerificationFlow.UnknownMethod: |
||||||
|
return qsTr("Other client does not support our verification protocol."); |
||||||
case DeviceVerificationFlow.MismatchedCommitment: |
case DeviceVerificationFlow.MismatchedCommitment: |
||||||
case DeviceVerificationFlow.MismatchedSAS: |
case DeviceVerificationFlow.MismatchedSAS: |
||||||
case DeviceVerificationFlow.KeyMismatch: return qsTr("Key mismatch detected!") |
case DeviceVerificationFlow.KeyMismatch: |
||||||
case DeviceVerificationFlow.Timeout: return qsTr("Device verification timed out.") |
return qsTr("Key mismatch detected!"); |
||||||
case DeviceVerificationFlow.User: return qsTr("Other party canceled the verification.") |
case DeviceVerificationFlow.Timeout: |
||||||
case DeviceVerificationFlow.OutOfOrder: return qsTr("Device verification timed out.") |
return qsTr("Device verification timed out."); |
||||||
default: return "Unknown verification error."; |
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 |
||||||
} |
} |
||||||
|
|
||||||
RowLayout { |
RowLayout { |
||||||
Item { |
Item { |
||||||
Layout.fillWidth: true |
Layout.fillWidth: true |
||||||
} |
} |
||||||
|
|
||||||
Button { |
Button { |
||||||
Layout.alignment: Qt.AlignRight |
Layout.alignment: Qt.AlignRight |
||||||
text: qsTr("Close") |
text: qsTr("Close") |
||||||
|
|
||||||
onClicked: dialog.close() |
onClicked: dialog.close() |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,45 +1,56 @@ |
|||||||
import QtQuick 2.3 |
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 |
import im.nheko 1.0 |
||||||
|
|
||||||
Pane { |
Pane { |
||||||
property string title: qsTr("Waiting for other party") |
property string title: qsTr("Waiting for other party") |
||||||
|
|
||||||
ColumnLayout { |
ColumnLayout { |
||||||
spacing: 16 |
spacing: 16 |
||||||
|
|
||||||
Label { |
Label { |
||||||
|
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: { |
||||||
text: switch (flow.state) { |
switch (flow.state) { |
||||||
case "WaitingForOtherToAccept": return qsTr("Waiting for other side to accept the verification request.") |
case "WaitingForOtherToAccept": |
||||||
case "WaitingForKeys": return qsTr("Waiting for other side to continue the verification request.") |
return qsTr("Waiting for other side to accept the verification request."); |
||||||
case "WaitingForMac": return qsTr("Waiting for other side to complete the verification request.") |
case "WaitingForKeys": |
||||||
|
return qsTr("Waiting for other side to continue the verification request."); |
||||||
|
case "WaitingForMac": |
||||||
|
return qsTr("Waiting for other side to complete the verification request."); |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
color: colors.text |
color: colors.text |
||||||
verticalAlignment: Text.AlignVCenter |
verticalAlignment: Text.AlignVCenter |
||||||
} |
} |
||||||
|
|
||||||
BusyIndicator { |
BusyIndicator { |
||||||
Layout.alignment: Qt.AlignHCenter |
Layout.alignment: Qt.AlignHCenter |
||||||
palette: colors |
palette: colors |
||||||
} |
} |
||||||
|
|
||||||
RowLayout { |
RowLayout { |
||||||
Button { |
Button { |
||||||
Layout.alignment: Qt.AlignLeft |
Layout.alignment: Qt.AlignLeft |
||||||
text: qsTr("Cancel") |
text: qsTr("Cancel") |
||||||
|
|
||||||
onClicked: { |
onClicked: { |
||||||
flow.cancel(); |
flow.cancel(); |
||||||
dialog.close(); |
dialog.close(); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
Item { |
Item { |
||||||
Layout.fillWidth: true |
Layout.fillWidth: true |
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
|
||||||
} |
} |
||||||
|
@ -1,17 +1,16 @@ |
|||||||
|
import "../" |
||||||
import QtQuick 2.10 |
import QtQuick 2.10 |
||||||
import QtQuick.Controls 2.1 |
import QtQuick.Controls 2.1 |
||||||
import im.nheko 1.0 |
import im.nheko 1.0 |
||||||
import im.nheko.EmojiModel 1.0 |
import im.nheko.EmojiModel 1.0 |
||||||
|
|
||||||
import "../" |
|
||||||
|
|
||||||
ImageButton { |
ImageButton { |
||||||
|
id: emojiButton |
||||||
|
|
||||||
property var colors: currentActivePalette |
property var colors: currentActivePalette |
||||||
property var emojiPicker |
property var emojiPicker |
||||||
property string event_id |
property string event_id |
||||||
|
|
||||||
image: ":/icons/icons/ui/smile.png" |
image: ":/icons/icons/ui/smile.png" |
||||||
id: emojiButton |
|
||||||
onClicked: emojiPicker.visible ? emojiPicker.close() : emojiPicker.show(emojiButton, event_id) |
onClicked: emojiPicker.visible ? emojiPicker.close() : emojiPicker.show(emojiButton, event_id) |
||||||
|
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue