feat(CommunitySettingsView): add "Invite ppl" button

- this adds direct access to sending invitations to new ppl (aka adding
members), instead of going thru the secondary nav context menu
- the new community context menu will be tackled in a separate
task/issue

Fixes #16597
This commit is contained in:
Lukáš Tinkl 2024-10-25 17:20:56 +02:00 committed by Lukáš Tinkl
parent 60a1532087
commit bd6289d4f2
3 changed files with 10 additions and 7 deletions

View File

@ -33,6 +33,7 @@ SettingsPage {
signal acceptRequestToJoin(string id) signal acceptRequestToJoin(string id)
signal declineRequestToJoin(string id) signal declineRequestToJoin(string id)
signal viewMemberMessagesClicked(string pubKey, string displayName) signal viewMemberMessagesClicked(string pubKey, string displayName)
signal inviteNewPeopleClicked()
function goTo(tab: int) { function goTo(tab: int) {
if(root.contentItem) { if(root.contentItem) {
@ -42,6 +43,13 @@ SettingsPage {
title: qsTr("Members") title: qsTr("Members")
buttons: [
StatusButton {
text: qsTr("Invite people")
onClicked: root.inviteNewPeopleClicked()
}
]
contentItem: ColumnLayout { contentItem: ColumnLayout {
function goTo(tab: int) { function goTo(tab: int) {

View File

@ -74,7 +74,6 @@ StackLayout {
signal edited(Item item) // item containing edited fields (name, description, logoImagePath, color, options, etc..) signal edited(Item item) // item containing edited fields (name, description, logoImagePath, color, options, etc..)
signal inviteNewPeopleClicked
signal airdropTokensClicked signal airdropTokensClicked
signal exportControlNodeClicked signal exportControlNodeClicked
signal importControlNodeClicked signal importControlNodeClicked
@ -369,6 +368,7 @@ StackLayout {
id: transferOwnershipAlertPopup id: transferOwnershipAlertPopup
TransferOwnershipAlertPopup { TransferOwnershipAlertPopup {
destroyOnClose: true
communityName: root.name communityName: root.name
communityLogo: root.logoImageData communityLogo: root.logoImageData

View File

@ -253,12 +253,6 @@ StatusSectionLayout {
} }
} }
onInviteNewPeopleClicked: {
Global.openInviteFriendsToCommunityPopup(root.community,
root.chatCommunitySectionModule,
null)
}
onAirdropTokensClicked: root.goTo(Constants.CommunitySettingsSections.Airdrops) onAirdropTokensClicked: root.goTo(Constants.CommunitySettingsSections.Airdrops)
onExportControlNodeClicked: { onExportControlNodeClicked: {
if(!root.isControlNode) if(!root.isControlNode)
@ -316,6 +310,7 @@ StatusSectionLayout {
root.rootStore.loadCommunityMemberMessages(root.community.id, pubKey) root.rootStore.loadCommunityMemberMessages(root.community.id, pubKey)
Global.openCommunityMemberMessagesPopupRequested(root.rootStore, root.chatCommunitySectionModule, pubKey, displayName) Global.openCommunityMemberMessagesPopupRequested(root.rootStore, root.chatCommunitySectionModule, pubKey, displayName)
} }
onInviteNewPeopleClicked: Global.openInviteFriendsToCommunityPopup(root.community, root.chatCommunitySectionModule, null)
} }
} }