mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-26 13:36:04 +00:00
feat(JoinCommunity): Integrated join community popup into the new view JoinCommunityView
- Integrated join community popup into the new view `JoinCommunityView`. - Added support in storybook related page. Closes #9268
This commit is contained in:
parent
8d5f625364
commit
2c809a56e6
@ -20,14 +20,25 @@ SplitView {
|
|||||||
// General properties:
|
// General properties:
|
||||||
property string name: "Uniswap"
|
property string name: "Uniswap"
|
||||||
property string communityDesc: "General channel for the community"
|
property string communityDesc: "General channel for the community"
|
||||||
|
property string introMessage: "%1 sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
|
||||||
|
|
||||||
|
1. Ut enim ad minim veniam
|
||||||
|
2. Excepteur sint occaecat cupidatat non proident
|
||||||
|
3. Duis aute irure
|
||||||
|
4. Dolore eu fugiat nulla pariatur
|
||||||
|
5. 🚗 consectetur adipiscing elit
|
||||||
|
|
||||||
|
Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.".arg(d.name)
|
||||||
|
|
||||||
property color color: "orchid"
|
property color color: "orchid"
|
||||||
property string channelName: joinCommunity ? "general" : "#vip"
|
property string channelName: joinCommunity ? "general" : "#vip"
|
||||||
property string channelDesc: "VIP members only"
|
property string channelDesc: "VIP members only"
|
||||||
property bool joinCommunity: true // Otherwise it means join channel action
|
property bool joinCommunity: true // Otherwise it means join channel action
|
||||||
|
property int accessType: Constants.communityChatPublicAccess
|
||||||
|
|
||||||
// Overlay component:
|
// Overlay component:
|
||||||
property bool requirementsMet: true
|
property bool requirementsMet: true
|
||||||
property bool isInvitationPending: false
|
property bool isInvitationPending: true
|
||||||
property bool isJoinRequestRejected: false
|
property bool isJoinRequestRejected: false
|
||||||
property bool requiresRequest: false
|
property bool requiresRequest: false
|
||||||
property var communityHoldings: PermissionsModel.shortPermissionsModel
|
property var communityHoldings: PermissionsModel.shortPermissionsModel
|
||||||
@ -95,10 +106,13 @@ SplitView {
|
|||||||
// General properties:
|
// General properties:
|
||||||
name: d.name
|
name: d.name
|
||||||
communityDesc: d.communityDesc
|
communityDesc: d.communityDesc
|
||||||
|
introMessage: d.introMessage
|
||||||
color: d.color
|
color: d.color
|
||||||
channelName: d.channelName
|
channelName: d.channelName
|
||||||
channelDesc: d.channelDesc
|
channelDesc: d.channelDesc
|
||||||
joinCommunity: d.joinCommunity
|
joinCommunity: d.joinCommunity
|
||||||
|
accessType: d.accessType
|
||||||
|
isInvitationPending: d.isInvitationPending
|
||||||
|
|
||||||
// Blur background properties:
|
// Blur background properties:
|
||||||
membersCount: d.membersCount
|
membersCount: d.membersCount
|
||||||
@ -112,7 +126,6 @@ SplitView {
|
|||||||
|
|
||||||
// Permissions properties
|
// Permissions properties
|
||||||
requirementsMet: d.requirementsMet
|
requirementsMet: d.requirementsMet
|
||||||
isInvitationPending: d.isInvitationPending
|
|
||||||
isJoinRequestRejected: d.isJoinRequestRejected
|
isJoinRequestRejected: d.isJoinRequestRejected
|
||||||
requiresRequest: d.requiresRequest
|
requiresRequest: d.requiresRequest
|
||||||
communityHoldings: d.communityHoldings
|
communityHoldings: d.communityHoldings
|
||||||
@ -126,8 +139,13 @@ SplitView {
|
|||||||
openCreateChat = !openCreateChat
|
openCreateChat = !openCreateChat
|
||||||
}
|
}
|
||||||
onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()")
|
onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()")
|
||||||
onRevealAddressClicked: logs.logEvent("JoinCommunityView::onRevealAddressClicked()")
|
onRevealAddressClicked: {
|
||||||
|
logs.logEvent("JoinCommunityView::onRevealAddressClicked()")
|
||||||
|
openJoinCommunityDialog()
|
||||||
|
}
|
||||||
onInvitationPendingClicked: logs.logEvent("JoinCommunityView::onInvitationPendingClicked()")
|
onInvitationPendingClicked: logs.logEvent("JoinCommunityView::onInvitationPendingClicked()")
|
||||||
|
onJoined: logs.logEvent("JoinCommunityView::onJoined()")
|
||||||
|
onCancelMembershipRequest: logs.logEvent("JoinCommunityView::onCancelMembershipRequest()")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,6 +209,44 @@ SplitView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Join types:
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: "JOIN TYPES"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 18
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: "Is invitation pending:"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
checked: d.isInvitationPending
|
||||||
|
onCheckedChanged: d.isInvitationPending = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
visible: !d.isInvitationPending
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: "Access type:"
|
||||||
|
}
|
||||||
|
|
||||||
|
RadioButton {
|
||||||
|
checked: true
|
||||||
|
text: qsTr("Public access")
|
||||||
|
onCheckedChanged: d.accessType = Constants.communityChatPublicAccess
|
||||||
|
}
|
||||||
|
RadioButton {
|
||||||
|
text: qsTr("On request")
|
||||||
|
onCheckedChanged: d.accessType = Constants.communityChatOnRequestAccess
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Join community overlay editor:
|
// Join community overlay editor:
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -14,6 +14,7 @@ import AppLayouts.Chat.views 1.0
|
|||||||
import StatusQ.Layout 0.1
|
import StatusQ.Layout 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
import shared.popups 1.0
|
||||||
|
|
||||||
StatusSectionLayout {
|
StatusSectionLayout {
|
||||||
id: root
|
id: root
|
||||||
@ -22,15 +23,17 @@ StatusSectionLayout {
|
|||||||
property bool amISectionAdmin: false
|
property bool amISectionAdmin: false
|
||||||
property bool openCreateChat: false
|
property bool openCreateChat: false
|
||||||
property string name
|
property string name
|
||||||
|
property string introMessage
|
||||||
property string communityDesc
|
property string communityDesc
|
||||||
property color color
|
property color color
|
||||||
property string channelName
|
property string channelName
|
||||||
property string channelDesc
|
property string channelDesc
|
||||||
property bool joinCommunity: true // Otherwise it means join channel action
|
property bool joinCommunity: true // Otherwise it means join channel action
|
||||||
|
property int accessType
|
||||||
|
property bool isInvitationPending: false
|
||||||
|
|
||||||
// Permission overlay view properties:
|
// Permission overlay view properties:
|
||||||
property bool requirementsMet: true
|
property bool requirementsMet: true
|
||||||
property bool isInvitationPending: false
|
|
||||||
property bool isJoinRequestRejected: false
|
property bool isJoinRequestRejected: false
|
||||||
property bool requiresRequest: false
|
property bool requiresRequest: false
|
||||||
property var communityHoldings
|
property var communityHoldings
|
||||||
@ -50,6 +53,12 @@ StatusSectionLayout {
|
|||||||
signal adHocChatButtonClicked
|
signal adHocChatButtonClicked
|
||||||
signal revealAddressClicked
|
signal revealAddressClicked
|
||||||
signal invitationPendingClicked
|
signal invitationPendingClicked
|
||||||
|
signal joined
|
||||||
|
signal cancelMembershipRequest
|
||||||
|
|
||||||
|
function openJoinCommunityDialog() {
|
||||||
|
joinCommunityDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
@ -283,4 +292,17 @@ StatusSectionLayout {
|
|||||||
transparentBorder: true
|
transparentBorder: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CommunityIntroDialog {
|
||||||
|
id: joinCommunityDialog
|
||||||
|
|
||||||
|
name: root.name
|
||||||
|
introMessage: root.introMessage
|
||||||
|
imageSrc: root.image
|
||||||
|
accessType: root.accessType
|
||||||
|
isInvitationPending: root.isInvitationPending
|
||||||
|
|
||||||
|
onJoined: root.joined()
|
||||||
|
onCancelMembershipRequest: root.cancelMembershipRequest()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user