2021-05-26 17:36:24 +00:00
|
|
|
import QtQuick 2.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-05-26 17:36:24 +00:00
|
|
|
import "../../../../../shared"
|
|
|
|
import "../../../../../shared/status"
|
|
|
|
|
|
|
|
Item {
|
2021-07-20 14:22:32 +00:00
|
|
|
visible: chatsModel.channelView.activeChannel.chatType === Constants.chatTypeOneToOne && (!isContact /*|| !contactRequestReceived*/)
|
2021-05-26 17:36:24 +00:00
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: waveImg
|
2021-09-28 15:04:06 +00:00
|
|
|
source: Style.png("wave")
|
2021-05-26 17:36:24 +00:00
|
|
|
width: 80
|
|
|
|
height: 80
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: contactText1
|
2021-07-22 15:03:59 +00:00
|
|
|
//% "You need to be mutual contacts with this person for them to receive your messages"
|
|
|
|
text: qsTrId("you-need-to-be-mutual-contacts-with-this-person-for-them-to-receive-your-messages")
|
|
|
|
//% "You need to be mutual contacts with this person for them to receive your messages"
|
|
|
|
// text: !isContact ? qsTrId("you-need-to-be-mutual-contacts-with-this-person-for-them-to-receive-your-messages") :
|
|
|
|
//% "Waiting for %1 to accept your request"
|
|
|
|
// qsTrId("waiting-for--1-to-accept-your-request").arg(Utils.removeStatusEns(chatsModel.channelView.activeChannel.name))
|
2021-05-26 17:36:24 +00:00
|
|
|
anchors.top: waveImg.bottom
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: parent.width / 1.3
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: contactText2
|
2021-05-26 18:56:04 +00:00
|
|
|
visible: !isContact
|
2021-07-16 20:22:50 +00:00
|
|
|
//% "Just click this button to add them as contact. They will receive a notification. Once they accept the request, you'll be able to chat"
|
|
|
|
text: qsTrId("just-click-this-button-to-add-them-as-contact--they-will-receive-a-notification--once-they-accept-the-request--you-ll-be-able-to-chat")
|
2021-05-26 17:36:24 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.top: contactText1.bottom
|
|
|
|
anchors.topMargin: 2
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: parent.width / 1.3
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
2021-05-26 18:56:04 +00:00
|
|
|
visible: !isContact
|
2021-07-16 20:22:50 +00:00
|
|
|
//% "Add to contacts"
|
|
|
|
text: qsTrId("add-to-contacts")
|
2021-05-26 17:36:24 +00:00
|
|
|
anchors.top: contactText2.bottom
|
|
|
|
anchors.topMargin: Style.current.smallPadding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
onClicked: profileModel.contacts.addContact(activeChatId)
|
|
|
|
}
|
|
|
|
}
|