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