2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtGraphicalEffects 1.15
|
2023-02-01 17:32:41 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.panels 1.0
|
2023-02-01 17:32:41 +00:00
|
|
|
import AppLayouts.Chat.views 1.0
|
|
|
|
|
|
|
|
import StatusQ.Layout 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
2023-02-02 15:27:37 +00:00
|
|
|
import shared.popups 1.0
|
2023-02-01 17:32:41 +00:00
|
|
|
|
|
|
|
StatusSectionLayout {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
// General properties:
|
|
|
|
property bool amISectionAdmin: false
|
|
|
|
property bool openCreateChat: false
|
|
|
|
property string name
|
2023-02-02 15:27:37 +00:00
|
|
|
property string introMessage
|
2023-02-01 17:32:41 +00:00
|
|
|
property string communityDesc
|
|
|
|
property color color
|
|
|
|
property string channelName
|
|
|
|
property string channelDesc
|
|
|
|
property bool joinCommunity: true // Otherwise it means join channel action
|
2023-02-02 15:27:37 +00:00
|
|
|
property int accessType
|
2024-04-04 16:03:10 +00:00
|
|
|
property int requestToJoinState: Constants.RequestToJoinState.None
|
2023-02-01 17:32:41 +00:00
|
|
|
|
|
|
|
// Permission overlay view properties:
|
|
|
|
property bool requirementsMet: true
|
2023-08-04 13:14:06 +00:00
|
|
|
property bool requirementsCheckPending: false
|
2023-02-01 17:32:41 +00:00
|
|
|
property bool isJoinRequestRejected: false
|
|
|
|
property bool requiresRequest: false
|
2023-02-13 10:40:13 +00:00
|
|
|
|
2023-02-14 16:33:23 +00:00
|
|
|
property var communityHoldingsModel
|
|
|
|
property var viewOnlyHoldingsModel
|
|
|
|
property var viewAndPostHoldingsModel
|
|
|
|
property var moderateHoldingsModel
|
2023-02-13 10:40:13 +00:00
|
|
|
property var assetsModel
|
|
|
|
property var collectiblesModel
|
2023-02-01 17:32:41 +00:00
|
|
|
|
|
|
|
// Blur view properties:
|
|
|
|
property int membersCount
|
|
|
|
property url image
|
|
|
|
property var communityItemsModel
|
|
|
|
property string chatDateTimeText
|
|
|
|
property string listUsersText
|
|
|
|
property var messagesModel
|
|
|
|
|
|
|
|
signal infoButtonClicked
|
|
|
|
signal adHocChatButtonClicked
|
2024-03-27 07:37:28 +00:00
|
|
|
signal requestToJoinClicked
|
2023-02-01 17:32:41 +00:00
|
|
|
signal invitationPendingClicked
|
2023-02-02 15:27:37 +00:00
|
|
|
|
2023-02-01 17:32:41 +00:00
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
readonly property int blurryRadius: 32
|
|
|
|
}
|
|
|
|
|
2023-06-08 11:01:01 +00:00
|
|
|
headerContent: JoinCommunityHeaderPanel {
|
|
|
|
joinCommunity: root.joinCommunity
|
|
|
|
color: root.color
|
|
|
|
name: root.name
|
|
|
|
channelName: root.channelName
|
|
|
|
communityDesc: root.communityDesc
|
|
|
|
channelDesc: root.channelDesc
|
2023-02-01 17:32:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Blur background:
|
|
|
|
leftPanel: ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
ColumnHeaderPanel {
|
2023-02-01 17:32:41 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
name: root.name
|
|
|
|
membersCount: root.membersCount
|
|
|
|
image: root.image
|
|
|
|
color: root.color
|
|
|
|
amISectionAdmin: root.amISectionAdmin
|
|
|
|
openCreateChat: root.openCreateChat
|
|
|
|
onInfoButtonClicked: if(root.amISectionAdmin) root.infoButtonClicked()
|
|
|
|
onAdHocChatButtonClicked: root.adHocChatButtonClicked()
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
2024-10-15 19:26:12 +00:00
|
|
|
Layout.margins: Theme.halfPadding
|
2023-06-08 11:01:01 +00:00
|
|
|
layer.enabled: root.joinCommunity
|
2023-02-01 17:32:41 +00:00
|
|
|
layer.effect: fastBlur
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: root.communityItemsModel
|
|
|
|
delegate: StatusChatListItem {
|
|
|
|
enabled: false
|
|
|
|
name: model.name
|
|
|
|
asset.color: root.color
|
|
|
|
selected: model.selected
|
|
|
|
type: StatusChatListItem.Type.CommunityChat
|
|
|
|
notificationsCount: model.notificationsCount
|
|
|
|
hasUnreadMessages: model.hasUnreadMessages
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
// filler
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Blur background + Permissions base information content:
|
2023-06-08 11:01:01 +00:00
|
|
|
centerPanel: JoinCommunityCenterPanel {
|
|
|
|
id: joinCommunityCenterPanel
|
2023-02-01 17:32:41 +00:00
|
|
|
|
2023-06-08 11:01:01 +00:00
|
|
|
anchors.fill: parent
|
2023-06-06 06:57:00 +00:00
|
|
|
|
2023-06-08 11:01:01 +00:00
|
|
|
joinCommunity: root.joinCommunity // Otherwise it means join channel action
|
2023-06-06 06:57:00 +00:00
|
|
|
|
2023-06-08 11:01:01 +00:00
|
|
|
name: root.name
|
|
|
|
channelName: root.channelName
|
2023-06-06 06:57:00 +00:00
|
|
|
|
2024-04-04 16:03:10 +00:00
|
|
|
requestToJoinState: root.requestToJoinState
|
2023-06-08 11:01:01 +00:00
|
|
|
isJoinRequestRejected: root.isJoinRequestRejected
|
|
|
|
requiresRequest: root.requiresRequest
|
|
|
|
requirementsMet: root.requirementsMet
|
2023-08-04 13:14:06 +00:00
|
|
|
requirementsCheckPending: root.requirementsCheckPending
|
2023-06-08 11:01:01 +00:00
|
|
|
|
|
|
|
communityHoldingsModel: root.communityHoldingsModel
|
|
|
|
viewOnlyHoldingsModel: root.viewOnlyHoldingsModel
|
|
|
|
viewAndPostHoldingsModel: root.viewAndPostHoldingsModel
|
|
|
|
moderateHoldingsModel: root.moderateHoldingsModel
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
|
|
|
|
chatDateTimeText: root.chatDateTimeText
|
|
|
|
listUsersText: root.listUsersText
|
|
|
|
messagesModel: root.messagesModel
|
|
|
|
|
2024-03-27 07:37:28 +00:00
|
|
|
onRequestToJoinClicked: root.requestToJoinClicked()
|
2023-06-08 11:01:01 +00:00
|
|
|
onInvitationPendingClicked: root.invitationPendingClicked()
|
2023-02-01 17:32:41 +00:00
|
|
|
}
|
2023-06-08 11:01:01 +00:00
|
|
|
|
2023-02-01 17:32:41 +00:00
|
|
|
showRightPanel: false
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: fastBlur
|
|
|
|
|
|
|
|
FastBlur {
|
|
|
|
radius: d.blurryRadius
|
|
|
|
transparentBorder: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|