2020-12-11 20:29:46 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
2021-10-01 15:58:36 +00:00
|
|
|
|
2021-10-19 08:54:29 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1 as StatusQControls
|
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-12-11 20:29:46 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
2021-04-28 19:03:41 +00:00
|
|
|
height: 220
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.padding
|
|
|
|
border.color: Style.current.border
|
|
|
|
radius: 16
|
|
|
|
color: Style.current.transparent
|
2021-10-21 00:41:54 +00:00
|
|
|
property var activeCommunity
|
2021-11-02 19:39:18 +00:00
|
|
|
property var store
|
2022-01-18 20:54:14 +00:00
|
|
|
property var communitySectionModule
|
2022-01-10 16:44:54 +00:00
|
|
|
property bool hasAddedContacts
|
2020-12-11 20:29:46 +00:00
|
|
|
|
2022-03-23 15:38:23 +00:00
|
|
|
signal manageCommunityClicked()
|
|
|
|
|
2021-06-25 09:13:54 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
acceptedButtons: Qt.RightButton
|
2022-05-25 08:57:57 +00:00
|
|
|
propagateComposedEvents: true
|
2021-06-25 09:13:54 +00:00
|
|
|
onClicked: {
|
|
|
|
/* Prevents sending events to the component beneath
|
|
|
|
if Right Mouse Button is clicked. */
|
|
|
|
mouse.accepted = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-06 19:30:17 +00:00
|
|
|
Rectangle {
|
|
|
|
width: 70
|
|
|
|
height: 4
|
|
|
|
color: Style.current.secondaryMenuBackground
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -2
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
|
2020-12-11 20:29:46 +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-12-11 20:29:46 +00:00
|
|
|
width: 66
|
|
|
|
height: 50
|
|
|
|
}
|
|
|
|
|
2021-10-18 10:34:16 +00:00
|
|
|
StatusQControls.StatusFlatRoundButton {
|
2020-12-11 20:29:46 +00:00
|
|
|
id: closeImg
|
2021-10-18 10:34:16 +00:00
|
|
|
implicitWidth: 32
|
|
|
|
implicitHeight: 32
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 10
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
icon.height: 20
|
|
|
|
icon.width: 20
|
2021-10-18 10:34:16 +00:00
|
|
|
icon.name: "close-circle"
|
|
|
|
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
2020-12-11 20:29:46 +00:00
|
|
|
onClicked: {
|
2021-11-02 19:39:18 +00:00
|
|
|
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityWelcomeBanners || []
|
|
|
|
if (hiddenBannerIds.includes(root.activeCommunity.id)) {
|
|
|
|
return
|
|
|
|
}
|
2021-10-21 00:41:54 +00:00
|
|
|
hiddenBannerIds.push(root.activeCommunity.id)
|
2021-10-20 09:50:50 +00:00
|
|
|
localAccountSensitiveSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
2020-12-11 20:29:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-19 08:54:29 +00:00
|
|
|
StatusBaseText {
|
2020-12-11 20:29:46 +00:00
|
|
|
id: welcomeText
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Welcome to your community!")
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 60
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.pixelSize: 15
|
2021-10-19 08:54:29 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-12-11 20:29:46 +00:00
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
}
|
|
|
|
|
2021-10-19 08:54:29 +00:00
|
|
|
StatusQControls.StatusButton {
|
2020-12-11 20:29:46 +00:00
|
|
|
id: addMembersBtn
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add members")
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: manageBtn.top
|
|
|
|
anchors.bottomMargin: Style.current.halfPadding
|
2021-12-07 20:33:12 +00:00
|
|
|
onClicked: Global.openPopup(inviteFriendsToCommunityPopup, {
|
2022-01-10 16:44:54 +00:00
|
|
|
community: root.activeCommunity,
|
2022-01-19 20:07:02 +00:00
|
|
|
hasAddedContacts: root.hasAddedContacts,
|
|
|
|
communitySectionModule: root.communitySectionModule
|
2021-07-21 09:49:03 +00:00
|
|
|
})
|
2020-12-11 20:29:46 +00:00
|
|
|
}
|
|
|
|
|
2021-10-19 08:54:29 +00:00
|
|
|
StatusQControls.StatusFlatButton {
|
2020-12-11 20:29:46 +00:00
|
|
|
id: manageBtn
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Manage community")
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: Style.current.padding
|
2022-03-23 15:38:23 +00:00
|
|
|
|
|
|
|
onClicked: root.manageCommunityClicked()
|
2020-12-11 20:29:46 +00:00
|
|
|
}
|
|
|
|
}
|