2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
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
|
|
|
|
|
2022-07-06 16:51:56 +00:00
|
|
|
property bool isUserAdded
|
2021-10-01 15:58:36 +00:00
|
|
|
signal addContactClicked()
|
|
|
|
|
2021-05-26 17:36:24 +00:00
|
|
|
Image {
|
|
|
|
id: waveImg
|
2024-10-15 19:26:12 +00:00
|
|
|
source: Theme.png("chat/wave")
|
2021-05-26 17:36:24 +00:00
|
|
|
width: 80
|
|
|
|
height: 80
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2023-04-26 15:33:24 +00:00
|
|
|
cache: false
|
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: contactText1
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("You need to be mutual contacts with this person for them to receive your messages")
|
2021-05-26 17:36:24 +00:00
|
|
|
anchors.top: waveImg.bottom
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.padding
|
2021-05-26 17:36:24 +00:00
|
|
|
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
|
2022-07-06 16:51:56 +00:00
|
|
|
visible: !isUserAdded
|
2022-04-04 11:26:30 +00: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 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 {
|
2022-07-06 16:51:56 +00:00
|
|
|
visible: !isUserAdded
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add to contacts")
|
2021-05-26 17:36:24 +00:00
|
|
|
anchors.top: contactText2.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.smallPadding
|
2021-05-26 17:36:24 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-10-01 15:58:36 +00:00
|
|
|
onClicked: addContactClicked()
|
2021-05-26 17:36:24 +00:00
|
|
|
}
|
|
|
|
}
|