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
This commit is contained in:
Iuri Matias 2020-06-17 18:02:23 -04:00
parent 93361921b7
commit 73520d1796
1 changed files with 16 additions and 4 deletions

View File

@ -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)