2020-12-11 15:38:10 -05:00
|
|
|
|
import QtQuick 2.13
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-21 17:07:13 +02:00
|
|
|
|
|
2021-10-27 16:17:15 +02:00
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-21 17:07:13 +02:00
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
2021-10-14 13:38:06 +02:00
|
|
|
|
import "../popups"
|
2020-12-11 15:38:10 -05:00
|
|
|
|
|
2021-03-16 15:19:48 -04:00
|
|
|
|
Item {
|
2020-12-11 15:38:10 -05:00
|
|
|
|
id: noContactsRect
|
2022-07-25 18:07:19 +03:00
|
|
|
|
implicitWidth: 260
|
|
|
|
|
implicitHeight: visible ? 120 : 0
|
2022-01-28 09:19:49 +01:00
|
|
|
|
|
2022-04-04 13:26:30 +02:00
|
|
|
|
property string text: qsTr("You don’t have any contacts yet. Invite your friends to start chatting.")
|
2021-07-13 10:56:18 +03:00
|
|
|
|
property alias textColor: noContacts.color
|
2022-01-28 09:19:49 +01:00
|
|
|
|
property var rootStore
|
|
|
|
|
|
2021-10-27 16:17:15 +02:00
|
|
|
|
StatusBaseText {
|
2020-12-11 15:38:10 -05:00
|
|
|
|
id: noContacts
|
2021-02-01 13:06:21 +01:00
|
|
|
|
text: noContactsRect.text
|
2021-10-27 16:17:15 +02:00
|
|
|
|
color: Theme.palette.baseColor1
|
2020-12-11 15:38:10 -05:00
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
wrapMode: Text.WordWrap
|
2021-02-01 13:06:21 +01:00
|
|
|
|
font.pixelSize: 15
|
2020-12-11 15:38:10 -05:00
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
}
|
2021-01-28 12:04:10 +01:00
|
|
|
|
StatusButton {
|
2022-04-04 13:26:30 +02:00
|
|
|
|
text: qsTr("Invite friends")
|
2020-12-11 15:38:10 -05:00
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
anchors.top: noContacts.bottom
|
2021-07-13 10:56:18 +03:00
|
|
|
|
anchors.topMargin: Style.current.padding
|
2023-05-23 14:46:16 +02:00
|
|
|
|
onClicked: Global.openPopup(inviteFriendsPopup);
|
2020-12-11 15:38:10 -05:00
|
|
|
|
}
|
2023-05-23 14:46:16 +02:00
|
|
|
|
|
|
|
|
|
Component {
|
2020-12-11 15:38:10 -05:00
|
|
|
|
id: inviteFriendsPopup
|
2023-05-23 14:46:16 +02:00
|
|
|
|
InviteFriendsPopup {
|
|
|
|
|
rootStore: noContactsRect.rootStore
|
|
|
|
|
}
|
2020-12-11 15:38:10 -05:00
|
|
|
|
}
|
|
|
|
|
}
|