2020-12-11 20:29:46 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
|
|
|
import "../../../../imports"
|
2020-12-11 20:38:10 +00:00
|
|
|
import "."
|
2020-12-11 20:29:46 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: root
|
|
|
|
height: visible ? 220 : 0
|
|
|
|
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
|
|
|
|
|
|
|
|
SVGImage {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: -6
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
source: "../../../img/chatEmptyHeader.svg"
|
|
|
|
width: 66
|
|
|
|
height: 50
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusIconButton {
|
|
|
|
icon.name: "close"
|
|
|
|
id: closeImg
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 10
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 10
|
|
|
|
icon.height: 20
|
|
|
|
icon.width: 20
|
|
|
|
iconColor: Style.current.darkGrey
|
|
|
|
onClicked: {
|
2021-03-11 12:49:29 +00:00
|
|
|
let hiddenBannerIds = appSettings.hiddenCommunityWelcomeBanners
|
|
|
|
hiddenBannerIds.push(chatsModel.communities.activeCommunity.id)
|
|
|
|
appSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
2020-12-11 20:29:46 +00:00
|
|
|
root.visible = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: welcomeText
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Welcome to your community!"
|
|
|
|
text: qsTrId("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
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: addMembersBtn
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Add members"
|
|
|
|
text: qsTrId("add-members")
|
2020-12-11 20:29:46 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: manageBtn.top
|
|
|
|
anchors.bottomMargin: Style.current.halfPadding
|
2021-03-29 19:31:18 +00:00
|
|
|
onClicked: openPopup(inviteFriendsToCommunityPopup)
|
2020-12-11 20:29:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: manageBtn
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Manage community"
|
|
|
|
text: qsTrId("manage-community")
|
2020-12-11 20:29:46 +00:00
|
|
|
type: "secondary"
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: Style.current.padding
|
2021-03-09 13:25:00 +00:00
|
|
|
onClicked: {
|
|
|
|
communityProfilePopup.communityId = chatsModel.communities.activeCommunity.id;
|
|
|
|
communityProfilePopup.name = chatsModel.communities.activeCommunity.name;
|
|
|
|
communityProfilePopup.description = chatsModel.communities.activeCommunity.description;
|
|
|
|
communityProfilePopup.access = chatsModel.communities.activeCommunity.access;
|
|
|
|
communityProfilePopup.nbMembers = chatsModel.communities.activeCommunity.nbMembers;
|
2021-03-16 12:11:17 +00:00
|
|
|
communityProfilePopup.isAdmin = chatsModel.communities.activeCommunity.admin;
|
2021-03-16 12:39:09 +00:00
|
|
|
communityProfilePopup.source = chatsModel.communities.activeCommunity.thumbnailImage
|
|
|
|
communityProfilePopup.communityColor = chatsModel.communities.activeCommunity.communityColor
|
2021-03-09 13:25:00 +00:00
|
|
|
communityProfilePopup.open()
|
|
|
|
}
|
2020-12-11 20:29:46 +00:00
|
|
|
}
|
|
|
|
}
|