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 declineRequestToJoin(string id)
signal viewMemberMessagesClicked(string pubKey, string displayName)
signal inviteNewPeopleClicked()
function goTo(tab: int) {
if(root.contentItem) {
@ -42,6 +43,13 @@ SettingsPage {
title: qsTr("Members")
buttons: [
StatusButton {
text: qsTr("Invite people")
onClicked: root.inviteNewPeopleClicked()
}
]
contentItem: ColumnLayout {
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 inviteNewPeopleClicked
signal airdropTokensClicked
signal exportControlNodeClicked
signal importControlNodeClicked
@ -369,6 +368,7 @@ StackLayout {
id: transferOwnershipAlertPopup
TransferOwnershipAlertPopup {
destroyOnClose: true
communityName: root.name
communityLogo: root.logoImageData

View File

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