From 73520d1796118e208c3019117579cb7f8d5bf081 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 17 Jun 2020 18:02:23 -0400 Subject: [PATCH] add send message button to profile popup; auto switch to chat tab if necessary add send message button to profile popup; auto switch to chat tab if necessary use theme colors use i18n --- .../Chat/components/ProfilePopup.qml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ui/app/AppLayouts/Chat/components/ProfilePopup.qml b/ui/app/AppLayouts/Chat/components/ProfilePopup.qml index 574c1efbb8..98cf5a7501 100644 --- a/ui/app/AppLayouts/Chat/components/ProfilePopup.qml +++ b/ui/app/AppLayouts/Chat/components/ProfilePopup.qml @@ -208,14 +208,26 @@ ModalPopup { width: parent.width height: children[0].height + StyledButton { + anchors.left: parent.left + anchors.leftMargin: 20 + label: qsTr("Send Message") + anchors.bottom: parent.bottom + onClicked: { + profilePopup.close() + if (tabBar.currentIndex !== 0) tabBar.currentIndex = 0 + chatsModel.joinChat(fromAuthor, Constants.chatTypeOneToOne) + } + } + StyledButton { anchors.right: parent.right anchors.rightMargin: addToContactsButton.width + 32 btnColor: "white" btnBorderWidth: 1 - btnBorderColor: "#EEF2F5" - textColor: "#FF2D55" - label: "Block User" + btnBorderColor: Theme.grey + textColor: Theme.red + label: qsTr("Block User") anchors.bottom: parent.bottom onClicked: { chatsModel.blockContact(fromAuthor) @@ -229,7 +241,7 @@ ModalPopup { id: addToContactsButton anchors.right: parent.right anchors.rightMargin: Theme.smallPadding - label: "Add to contacts" + label: qsTr("Add to contacts") anchors.bottom: parent.bottom onClicked: { chatsModel.addContact(fromAuthor)