parent
2e2c54229b
commit
a5954d3bf3
|
@ -10,6 +10,8 @@ import utils 1.0
|
||||||
import "../../popups/community"
|
import "../../popups/community"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
property var activeCommunity
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
height: childrenRect.height + Style.current.padding
|
height: childrenRect.height + Style.current.padding
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -71,10 +73,12 @@ Rectangle {
|
||||||
TransferOwnershipPopup {
|
TransferOwnershipPopup {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
onClosed: {
|
onClosed: {
|
||||||
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityBackUpBanners
|
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityBackUpBanners || []
|
||||||
hiddenBannerIds.push(chatsModel.communities.activeCommunity.id)
|
if (hiddenBannerIds.includes(root.activeCommunity.id)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
hiddenBannerIds.push(root.activeCommunity.id)
|
||||||
localAccountSensitiveSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
localAccountSensitiveSettings.hiddenCommunityBackUpBanners = hiddenBannerIds
|
||||||
destroy()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ Rectangle {
|
||||||
radius: 16
|
radius: 16
|
||||||
color: Style.current.transparent
|
color: Style.current.transparent
|
||||||
property var activeCommunity
|
property var activeCommunity
|
||||||
|
property var store
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -55,10 +56,12 @@ Rectangle {
|
||||||
icon.name: "close-circle"
|
icon.name: "close-circle"
|
||||||
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
||||||
onClicked: {
|
onClicked: {
|
||||||
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityWelcomeBanners
|
let hiddenBannerIds = localAccountSensitiveSettings.hiddenCommunityWelcomeBanners || []
|
||||||
|
if (hiddenBannerIds.includes(root.activeCommunity.id)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
hiddenBannerIds.push(root.activeCommunity.id)
|
hiddenBannerIds.push(root.activeCommunity.id)
|
||||||
localAccountSensitiveSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
localAccountSensitiveSettings.hiddenCommunityWelcomeBanners = hiddenBannerIds
|
||||||
root.visible = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ StatusModal {
|
||||||
header.title: contentItem.currentItem.headerTitle
|
header.title: contentItem.currentItem.headerTitle
|
||||||
header.subTitle: contentItem.currentItem.headerSubtitle || ""
|
header.subTitle: contentItem.currentItem.headerSubtitle || ""
|
||||||
header.image.source: contentItem.currentItem.headerImageSource || ""
|
header.image.source: contentItem.currentItem.headerImageSource || ""
|
||||||
header.icon.isLetterIdenticon: contentItem.currentItem.headerTitle == root.community.name && !contentItem.currentItem.headerImageSource
|
header.icon.isLetterIdenticon: contentItem.currentItem.headerTitle === root.community.name && !contentItem.currentItem.headerImageSource
|
||||||
header.icon.background.color: root.community.communityColor
|
header.icon.background.color: root.community.communityColor
|
||||||
|
|
||||||
contentItem: StackView {
|
contentItem: StackView {
|
||||||
|
@ -88,6 +88,18 @@ StatusModal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: editCommunityroot
|
||||||
|
CreateCommunityPopup {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
store: root.store
|
||||||
|
isEdit: true
|
||||||
|
onClosed: {
|
||||||
|
destroy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: membersList
|
id: membersList
|
||||||
CommunityProfilePopupMembersListPanel {
|
CommunityProfilePopupMembersListPanel {
|
||||||
|
|
|
@ -94,7 +94,7 @@ StatusModal {
|
||||||
input.placeholderText: qsTr("A catchy name")
|
input.placeholderText: qsTr("A catchy name")
|
||||||
validators: [StatusMinLengthValidator {
|
validators: [StatusMinLengthValidator {
|
||||||
minLength: 1
|
minLength: 1
|
||||||
errorMessage: Utils.getErrorMessage(errors, "community name")
|
errorMessage: Utils.getErrorMessage(nameInput.errors, "community name")
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ StatusModal {
|
||||||
|
|
||||||
validators: [StatusMinLengthValidator {
|
validators: [StatusMinLengthValidator {
|
||||||
minLength: 1
|
minLength: 1
|
||||||
errorMessage: Utils.getErrorMessage(errors, "community description")
|
errorMessage: Utils.getErrorMessage(descriptionTextArea.errors, "community description")
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,7 +237,9 @@ Item {
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: emptyViewAndSuggestionsLoader
|
id: emptyViewAndSuggestionsLoader
|
||||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !localAccountSensitiveSettings.hiddenCommunityWelcomeBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
active: root.store.chatsModelInst.communities.activeCommunity.admin &&
|
||||||
|
(!localAccountSensitiveSettings.hiddenCommunityWelcomeBanners ||
|
||||||
|
!localAccountSensitiveSettings.hiddenCommunityWelcomeBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id))
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: active ? item.height : 0
|
height: active ? item.height : 0
|
||||||
anchors.top: communityChatListAndCategories.bottom
|
anchors.top: communityChatListAndCategories.bottom
|
||||||
|
@ -245,13 +247,16 @@ Item {
|
||||||
sourceComponent: Component {
|
sourceComponent: Component {
|
||||||
CommunityWelcomeBannerPanel {
|
CommunityWelcomeBannerPanel {
|
||||||
activeCommunity: store.activeCommunity
|
activeCommunity: store.activeCommunity
|
||||||
|
store: root.store
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: backUpBannerLoader
|
id: backUpBannerLoader
|
||||||
active: root.store.chatsModelInst.communities.activeCommunity.admin && !localAccountSensitiveSettings.hiddenCommunityBackUpBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id)
|
active: root.store.chatsModelInst.communities.activeCommunity.admin &&
|
||||||
|
(!localAccountSensitiveSettings.hiddenCommunityBackUpBanners ||
|
||||||
|
!localAccountSensitiveSettings.hiddenCommunityBackUpBanners.includes(root.store.chatsModelInst.communities.activeCommunity.id))
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: active ? item.height : 0
|
height: active ? item.height : 0
|
||||||
anchors.top: emptyViewAndSuggestionsLoader.bottom
|
anchors.top: emptyViewAndSuggestionsLoader.bottom
|
||||||
|
@ -263,6 +268,7 @@ Item {
|
||||||
|
|
||||||
BackUpCommuntyBannerPanel {
|
BackUpCommuntyBannerPanel {
|
||||||
id: backupBanner
|
id: backupBanner
|
||||||
|
activeCommunity: store.activeCommunity
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: backupBanner
|
anchors.fill: backupBanner
|
||||||
|
|
|
@ -647,7 +647,6 @@ Item {
|
||||||
id: communityProfilePopup
|
id: communityProfilePopup
|
||||||
|
|
||||||
CommunityProfilePopup {
|
CommunityProfilePopup {
|
||||||
id: communityProfilePopup
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
onClosed: {
|
onClosed: {
|
||||||
|
|
Loading…
Reference in New Issue