summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorCH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com>2020-06-26 15:10:37 +0530
committerCH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com>2020-07-30 22:10:27 +0530
commitffa61095b8be7c61c3b4cdd693e59239ab668516 (patch)
tree4223b877e5e55d484f443ed4d9dd4c0aaaf7abb3 /resources
parentAdd some Userprofile buttons (diff)
downloadnheko-ffa61095b8be7c61c3b4cdd693e59239ab668516.tar.xz
Error Handling and some fixes
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/UserProfile.qml16
-rw-r--r--resources/qml/device-verification/DeviceVerification.qml52
2 files changed, 17 insertions, 51 deletions
diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml

index 36c8586d..6ef75031 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml
@@ -108,30 +108,28 @@ ApplicationWindow{ // userProfileList.ignoreUser() // } // } - ImageButton{ - image:":/icons/icons/ui/round-remove-button.png" + image:":/icons/icons/ui/black-bubble-speech.png" Layout.margins: { left: 5 right: 5 } ToolTip.visible: hovered - ToolTip.text: qsTr("Kick the user") + ToolTip.text: qsTr("Start a private chat") onClicked : { - userProfileList.kickUser() + userProfileList.startChat() } } - ImageButton{ - image:":/icons/icons/ui/black-bubble-speech.png" + image:":/icons/icons/ui/round-remove-button.png" Layout.margins: { left: 5 right: 5 } ToolTip.visible: hovered - ToolTip.text: qsTr("Start a conversation") + ToolTip.text: qsTr("Kick the user") onClicked : { - userProfileList.startChat() + userProfileList.kickUser() } } } @@ -205,7 +203,7 @@ ApplicationWindow{ text:"OK" onClicked: userProfileDialog.close() - Layout.alignment: Qt.AlignRight + Layout.alignment: Qt.AlignRight | Qt.AlignBottom Layout.margins : { right : 10 diff --git a/resources/qml/device-verification/DeviceVerification.qml b/resources/qml/device-verification/DeviceVerification.qml
index ca21f484..15c2d7a2 100644 --- a/resources/qml/device-verification/DeviceVerification.qml +++ b/resources/qml/device-verification/DeviceVerification.qml
@@ -22,12 +22,6 @@ ApplicationWindow { implicitHeight: currentItem.implicitHeight } - onClosing: { - flow.cancelVerification(); - deviceVerificationList.remove(flow.tranId); - delete flow; - } - property var flow Connections { target: flow @@ -123,33 +117,6 @@ ApplicationWindow { color:colors.text verticalAlignment: Text.AlignVCenter } - - RowLayout { - RadioButton { - id: decimalRadio - Layout.alignment: Qt.AlignLeft - text: qsTr("Decimal") - contentItem: Text { - text: decimalRadio.text - color: colors.text - } - onClicked: { flow.method = DeviceVerificationFlow.Decimal } - } - Item { - Layout.fillWidth: true - } - RadioButton { - id: emojiRadio - Layout.alignment: Qt.AlignRight - text: qsTr("Emoji") - contentItem: Text { - text: emojiRadio.text - color: colors.text - } - onClicked: { flow.method = DeviceVerificationFlow.Emoji } - } - } - RowLayout { Button { Layout.alignment: Qt.AlignLeft @@ -165,9 +132,8 @@ ApplicationWindow { } onClicked: { dialog.close(); - flow.cancelVerification(); + flow.cancelVerification(DeviceVerificationFlow.User); deviceVerificationList.remove(flow.tranId); - delete flow; } } Item { @@ -227,9 +193,8 @@ ApplicationWindow { } onClicked: { dialog.close(); - flow.cancelVerification(); + flow.cancelVerification(DeviceVerificationFlow.User); deviceVerificationList.remove(flow.tranId); - delete flow; } } Item { @@ -261,14 +226,17 @@ ApplicationWindow { Label { font.pixelSize: Qt.application.font.pixelSize * 2 text: flow.sasList[0] + color:colors.text } Label { font.pixelSize: Qt.application.font.pixelSize * 2 text: flow.sasList[1] + color:colors.text } Label { font.pixelSize: Qt.application.font.pixelSize * 2 text: flow.sasList[2] + color:colors.text } } @@ -287,9 +255,8 @@ ApplicationWindow { } onClicked: { dialog.close(); - flow.cancelVerification(); + flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS); deviceVerificationList.remove(flow.tranId); - delete flow; } } Item { @@ -411,6 +378,7 @@ ApplicationWindow { implicitWidth: col.width ColumnLayout { id: col + Layout.fillWidth: true anchors.bottom: parent.bottom property var emoji: emojis.mapping[flow.sasList[index]] Label { @@ -424,6 +392,7 @@ ApplicationWindow { Label { Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom text: col.emoji.description + color:colors.text } } } @@ -445,9 +414,8 @@ ApplicationWindow { } onClicked: { dialog.close(); - flow.cancelVerification(); + flow.cancelVerification(DeviceVerificationFlow.MismatchedSAS); deviceVerificationList.remove(flow.tranId); - delete flow; } } Item { @@ -507,7 +475,7 @@ ApplicationWindow { } onClicked: { dialog.close(); - flow.cancelVerification(); + flow.cancelVerification(DeviceVerificationFlow.User); deviceVerificationList.remove(flow.tranId); delete flow; }