status-desktop/ui/imports/shared/views/NoFriendsRectangle.qml

46 lines
1.1 KiB
QML
Raw Normal View History

import QtQuick 2.15
import utils 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import "../popups"
2020-12-11 20:38:10 +00:00
Item {
2020-12-11 20:38:10 +00:00
id: noContactsRect
implicitWidth: 260
implicitHeight: visible ? 120 : 0
property string text: qsTr("You dont have any contacts yet. Invite your friends to start chatting.")
property alias textColor: noContacts.color
StatusBaseText {
2020-12-11 20:38:10 +00:00
id: noContacts
text: noContactsRect.text
color: Theme.palette.baseColor1
2020-12-11 20:38:10 +00:00
anchors.top: parent.top
anchors.topMargin: Theme.padding
2020-12-11 20:38:10 +00:00
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
font.pixelSize: 15
2020-12-11 20:38:10 +00:00
horizontalAlignment: Text.AlignHCenter
}
StatusButton {
text: qsTr("Invite friends")
2020-12-11 20:38:10 +00:00
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: noContacts.bottom
anchors.topMargin: Theme.padding
onClicked: Global.openPopup(inviteFriendsPopup);
2020-12-11 20:38:10 +00:00
}
Component {
2020-12-11 20:38:10 +00:00
id: inviteFriendsPopup
InviteFriendsPopup {
destroyOnClose: true
}
2020-12-11 20:38:10 +00:00
}
}