2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-07-08 19:19:34 +00:00
|
|
|
import QtGraphicalEffects 1.13
|
2020-05-28 00:21:02 +00:00
|
|
|
import "../components"
|
2020-09-23 16:49:20 +00:00
|
|
|
import "../data/channelList.js" as ChannelJSON
|
2020-06-19 18:06:58 +00:00
|
|
|
import "../../../../shared"
|
2021-10-14 11:09:03 +00:00
|
|
|
import "../../../../shared/popups"
|
2021-10-14 12:14:11 +00:00
|
|
|
import "../../../../shared/panels"
|
2021-01-28 11:04:10 +00:00
|
|
|
import "../../../../shared/status"
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-05-28 00:21:02 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
Rectangle {
|
2020-07-08 19:59:10 +00:00
|
|
|
id: emptyView
|
2020-05-28 00:21:02 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
height: suggestionContainer.height + inviteFriendsContainer.height + Style.current.padding * 2
|
2021-03-26 17:57:30 +00:00
|
|
|
border.color: Style.current.secondaryMenuBorder
|
2020-09-23 20:32:51 +00:00
|
|
|
radius: 16
|
|
|
|
color: Style.current.transparent
|
2020-09-23 16:49:20 +00:00
|
|
|
|
2020-12-04 14:24:28 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.rightMargin: Style.current.padding
|
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
Item {
|
|
|
|
id: inviteFriendsContainer
|
|
|
|
height: visible ? 190 : 0
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 0
|
2020-05-28 00:21:02 +00:00
|
|
|
anchors.right: parent.right
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.rightMargin: 0
|
2020-05-28 00:21:02 +00:00
|
|
|
anchors.left: parent.left
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.leftMargin: 0
|
2020-05-28 00:21:02 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
SVGImage {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -6
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-09-28 15:04:06 +00:00
|
|
|
source: Style.svg("chatEmptyHeader")
|
2020-09-23 20:32:51 +00:00
|
|
|
width: 66
|
|
|
|
height: 50
|
|
|
|
}
|
|
|
|
|
2021-05-05 16:46:25 +00:00
|
|
|
StatusIconButton {
|
|
|
|
icon.name: "close"
|
2020-09-23 20:32:51 +00:00
|
|
|
id: closeImg
|
2020-07-08 19:19:34 +00:00
|
|
|
anchors.top: parent.top
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.topMargin: 10
|
2020-07-08 19:19:34 +00:00
|
|
|
anchors.right: parent.right
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.rightMargin: 10
|
2021-05-05 16:46:25 +00:00
|
|
|
icon.height: 20
|
|
|
|
icon.width: 20
|
2021-07-09 08:50:16 +00:00
|
|
|
iconColor: Style.current.midGrey
|
2020-09-23 20:32:51 +00:00
|
|
|
onClicked: {
|
2020-11-26 15:46:54 +00:00
|
|
|
appSettings.hideChannelSuggestions = true
|
2020-09-23 20:32:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: chatAndTransactText
|
|
|
|
//% "Chat and transact privately with your friends"
|
|
|
|
text: qsTrId("chat-and-transact-privately-with-your-friends")
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 56
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 15
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
2020-07-08 19:19:34 +00:00
|
|
|
anchors.left: parent.left
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
}
|
2020-05-28 00:21:02 +00:00
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
StatusButton {
|
2020-09-23 20:32:51 +00:00
|
|
|
//% "Invite friends"
|
2021-01-28 11:04:10 +00:00
|
|
|
text: qsTrId("invite-friends")
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: Style.current.xlPadding
|
|
|
|
onClicked: {
|
|
|
|
inviteFriendsPopup.open()
|
2020-05-28 00:21:02 +00:00
|
|
|
}
|
2020-09-23 20:32:51 +00:00
|
|
|
}
|
2020-07-08 19:19:34 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
InviteFriendsPopup {
|
|
|
|
id: inviteFriendsPopup
|
|
|
|
}
|
|
|
|
}
|
2020-07-08 19:19:34 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
Separator {
|
|
|
|
anchors.topMargin: 0
|
|
|
|
anchors.top: inviteFriendsContainer.bottom
|
|
|
|
color: Style.current.border
|
|
|
|
}
|
2020-07-08 19:19:34 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
Item {
|
|
|
|
id: suggestionContainer
|
|
|
|
anchors.top: inviteFriendsContainer.bottom
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.rightMargin: Style.current.padding
|
2020-07-09 15:21:45 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
height: {
|
|
|
|
if (!visible) return 0
|
|
|
|
var totalHeight = 0
|
|
|
|
for (let i = 0; i < sectionRepeater.count; i++) {
|
|
|
|
totalHeight += sectionRepeater.itemAt(i).height + Style.current.padding
|
2020-05-28 00:21:02 +00:00
|
|
|
}
|
2020-09-23 20:32:51 +00:00
|
|
|
return suggestionsText.height + totalHeight + Style.current.smallPadding
|
2020-07-08 19:19:34 +00:00
|
|
|
}
|
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
StyledText {
|
|
|
|
id: suggestionsText
|
|
|
|
width: parent.width
|
|
|
|
//% "Follow your interests in one of the many Public Chats."
|
|
|
|
text: qsTrId("follow-your-interests-in-one-of-the-many-public-chats.")
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: Style.current.xlPadding
|
|
|
|
font.pointSize: 15
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
verticalAlignment: Text.AlignTop
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
fontSizeMode: Text.FixedSize
|
|
|
|
renderType: Text.QtRendering
|
2020-07-08 19:19:34 +00:00
|
|
|
anchors.right: parent.right
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
2020-07-08 19:19:34 +00:00
|
|
|
anchors.left: parent.left
|
2020-09-23 20:32:51 +00:00
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
}
|
2020-07-08 19:19:34 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
Item {
|
|
|
|
anchors.top: suggestionsText.bottom
|
|
|
|
anchors.topMargin: Style.current.smallPadding
|
|
|
|
width: parent.width
|
2020-09-23 17:42:15 +00:00
|
|
|
|
2020-09-23 20:32:51 +00:00
|
|
|
SuggestedChannels {
|
|
|
|
id: sectionRepeater
|
2020-09-23 19:11:27 +00:00
|
|
|
}
|
2020-05-28 00:21:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-17 19:18:31 +00:00
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
2020-07-08 19:19:34 +00:00
|
|
|
D{i:0;autoSize:true;formeditorColor:"#ffffff";formeditorZoom:1.25;height:500;width:300}
|
2020-06-17 19:18:31 +00:00
|
|
|
}
|
|
|
|
##^##*/
|