2021-05-26 13:36:24 -04:00
|
|
|
import QtQuick 2.13
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-18 13:03:21 +02:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2021-10-21 09:55:27 +02:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-18 13:03:21 +02:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared.panels 1.0
|
2021-05-26 13:36:24 -04:00
|
|
|
|
|
|
|
Item {
|
|
|
|
width: parent.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
2021-11-15 10:15:21 -05:00
|
|
|
property bool isContact
|
2021-10-01 18:58:36 +03:00
|
|
|
signal addContactClicked()
|
|
|
|
|
2021-05-26 13:36:24 -04:00
|
|
|
Image {
|
|
|
|
id: waveImg
|
2022-04-01 23:53:57 +03:00
|
|
|
source: Style.png("chat/wave")
|
2021-05-26 13:36:24 -04:00
|
|
|
width: 80
|
|
|
|
height: 80
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
2021-10-18 13:03:21 +02:00
|
|
|
StatusBaseText {
|
2021-05-26 13:36:24 -04:00
|
|
|
id: contactText1
|
2021-07-22 17:03:59 +02: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 13:36:24 -04: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 13:03:21 +02:00
|
|
|
color: Theme.palette.directColor1
|
2021-05-26 13:36:24 -04:00
|
|
|
}
|
|
|
|
|
2021-10-18 13:03:21 +02:00
|
|
|
StatusBaseText {
|
2021-05-26 13:36:24 -04:00
|
|
|
id: contactText2
|
2021-05-26 14:56:04 -04:00
|
|
|
visible: !isContact
|
2021-07-16 22:22:50 +02: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 13:36:24 -04: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 13:03:21 +02:00
|
|
|
color: Theme.palette.directColor1
|
2021-05-26 13:36:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
2021-05-26 14:56:04 -04:00
|
|
|
visible: !isContact
|
2021-07-16 22:22:50 +02:00
|
|
|
//% "Add to contacts"
|
|
|
|
text: qsTrId("add-to-contacts")
|
2021-05-26 13:36:24 -04:00
|
|
|
anchors.top: contactText2.bottom
|
|
|
|
anchors.topMargin: Style.current.smallPadding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-10-01 18:58:36 +03:00
|
|
|
onClicked: addContactClicked()
|
2021-05-26 13:36:24 -04:00
|
|
|
}
|
|
|
|
}
|