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
|
|
|
|
|
2022-07-06 12:51:56 -04:00
|
|
|
property bool isUserAdded
|
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
|
2023-04-26 17:33:24 +02:00
|
|
|
cache: false
|
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: contactText1
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("You need to be mutual contacts with this person for them to receive your messages")
|
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
|
2022-07-06 12:51:56 -04:00
|
|
|
visible: !isUserAdded
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("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 {
|
2022-07-06 12:51:56 -04:00
|
|
|
visible: !isUserAdded
|
2022-04-04 13:26:30 +02:00
|
|
|
text: qsTr("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
|
|
|
}
|
|
|
|
}
|