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-10-18 11:03:21 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2021-10-21 07:55:27 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-18 11:03:21 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.panels 1.0
|
2021-05-26 17:36:24 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
2021-11-15 15:15:21 +00:00
|
|
|
property bool isContact
|
2021-10-01 15:58:36 +00:00
|
|
|
signal addContactClicked()
|
|
|
|
|
2021-05-26 17:36:24 +00:00
|
|
|
Image {
|
|
|
|
id: waveImg
|
2022-04-01 20:53:57 +00:00
|
|
|
source: Style.png("chat/wave")
|
2021-05-26 17:36:24 +00:00
|
|
|
width: 80
|
|
|
|
height: 80
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
2021-10-18 11:03:21 +00:00
|
|
|
StatusBaseText {
|
2021-05-26 17:36:24 +00:00
|
|
|
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
|
2021-10-18 11:03:21 +00:00
|
|
|
color: Theme.palette.directColor1
|
2021-05-26 17:36:24 +00:00
|
|
|
}
|
|
|
|
|
2021-10-18 11:03:21 +00:00
|
|
|
StatusBaseText {
|
2021-05-26 17:36:24 +00:00
|
|
|
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
|
2021-10-18 11:03:21 +00:00
|
|
|
color: Theme.palette.directColor1
|
2021-05-26 17:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2021-10-01 15:58:36 +00:00
|
|
|
onClicked: addContactClicked()
|
2021-05-26 17:36:24 +00:00
|
|
|
}
|
|
|
|
}
|