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