2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
2022-05-06 19:30:17 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
2022-05-10 16:04:25 +00:00
|
|
|
|
|
|
|
property string communityId
|
|
|
|
signal addMembersClicked()
|
|
|
|
signal addCategoriesClicked()
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
implicitHeight: childrenRect.height + Theme.padding
|
2022-05-06 19:30:17 +00:00
|
|
|
anchors.left: parent.left
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.leftMargin: Theme.padding
|
2022-05-06 19:30:17 +00:00
|
|
|
anchors.right: parent.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.padding
|
|
|
|
border.color: Theme.palette.border
|
2022-05-06 19:30:17 +00:00
|
|
|
radius: 16
|
2024-10-15 19:26:12 +00:00
|
|
|
color: Theme.palette.transparent
|
2022-05-06 19:30:17 +00:00
|
|
|
|
2022-09-15 22:17:51 +00:00
|
|
|
Rectangle {
|
2022-05-06 19:30:17 +00:00
|
|
|
width: 66
|
|
|
|
height: 4
|
2024-10-15 19:26:12 +00:00
|
|
|
color: Theme.palette.secondaryMenuBackground
|
2022-05-06 19:30:17 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -2
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRoundIcon {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -6
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 40
|
|
|
|
height: 40
|
2022-08-11 11:55:08 +00:00
|
|
|
asset.name: "channel"
|
2022-05-06 19:30:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusFlatRoundButton {
|
|
|
|
id: closeImg
|
|
|
|
implicitWidth: 32
|
|
|
|
implicitHeight: 32
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 10
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
icon.height: 20
|
|
|
|
icon.width: 20
|
|
|
|
icon.name: "close-circle"
|
|
|
|
type: StatusFlatRoundButton.Type.Tertiary
|
|
|
|
onClicked: {
|
|
|
|
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityChannelAndCategoriesBanners || []
|
|
|
|
if (hiddenBannerIds.includes(communityId)) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
hiddenBannerIds.push(communityId)
|
|
|
|
localAccountSensitiveSettings.hiddenCommunityChannelAndCategoriesBanners = hiddenBannerIds
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: descriptionText
|
|
|
|
text: qsTr("Expand your community by adding more channels and categories")
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 48
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.rightMargin: Theme.xlPadding
|
2022-05-06 19:30:17 +00:00
|
|
|
anchors.left: parent.left
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.leftMargin: Theme.xlPadding
|
2022-05-06 19:30:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: addMembersBtn
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add channels")
|
2022-05-06 19:30:17 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: descriptionText.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.padding
|
2022-05-10 16:04:25 +00:00
|
|
|
onClicked: {
|
|
|
|
root.addMembersClicked();
|
|
|
|
}
|
2022-05-06 19:30:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusFlatButton {
|
|
|
|
id: manageBtn
|
|
|
|
text: qsTr("Add categories")
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: addMembersBtn.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.halfPadding
|
2022-05-06 19:30:17 +00:00
|
|
|
|
2022-05-10 16:04:25 +00:00
|
|
|
onClicked: {
|
|
|
|
root.addCategoriesClicked();
|
|
|
|
}
|
2022-05-06 19:30:17 +00:00
|
|
|
}
|
|
|
|
}
|