chore(Communities): CommunityIntroDialog renamed to CommunityMembershipSetupDialog

Closes: #14144
This commit is contained in:
Michał Cieślak 2024-03-25 18:32:33 +01:00 committed by Michał
parent 0985346342
commit 0557977aa2
8 changed files with 117 additions and 109 deletions

View File

@ -38,7 +38,7 @@ SplitView {
onClicked: dialog.open()
}
CommunityIntroDialog {
CommunityMembershipSetupDialog {
id: dialog
anchors.centerIn: parent
@ -66,14 +66,14 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
assetsModel: AssetsModel {}
collectiblesModel: CollectiblesModel {}
onCancelMembershipRequest: logs.logEvent("CommunityIntroDialog::onCancelMembershipRequest()")
onCancelMembershipRequest: logs.logEvent("CommunityMembershipSetupDialog::onCancelMembershipRequest()")
onPrepareForSigning: logs.logEvent("CommunityIntroDialog::onPrepareForSigning", ["airdropAddress", "sharedAddresses"], arguments)
onJoinCommunity: logs.logEvent("CommunityIntroDialog::onJoinCommunity")
onEditRevealedAddresses: logs.logEvent("CommunityIntroDialog::editRevealedAddresses")
onSignProfileKeypairAndAllNonKeycardKeypairs: logs.logEvent("CommunityIntroDialog::editRevealedAddresses")
onSignSharedAddressesForKeypair: logs.logEvent("CommunityIntroDialog::onSignSharedAddressesForKeypair", ["keyUid"], arguments)
onSharedAddressesUpdated: logs.logEvent("CommunityIntroDialog::onSharedAddressesUpdated", ["sharedAddresses"], arguments)
onPrepareForSigning: logs.logEvent("CommunityMembershipSetupDialog::onPrepareForSigning", ["airdropAddress", "sharedAddresses"], arguments)
onJoinCommunity: logs.logEvent("CommunityMembershipSetupDialog::onJoinCommunity")
onEditRevealedAddresses: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses")
onSignProfileKeypairAndAllNonKeycardKeypairs: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses")
onSignSharedAddressesForKeypair: logs.logEvent("CommunityMembershipSetupDialog::onSignSharedAddressesForKeypair", ["keyUid"], arguments)
onSharedAddressesUpdated: logs.logEvent("CommunityMembershipSetupDialog::onSharedAddressesUpdated", ["sharedAddresses"], arguments)
getCurrencyAmount: function (balance, symbol) {
return ({
amount: balance,

View File

@ -119,7 +119,7 @@ StackLayout {
onNotificationButtonClicked: Global.openActivityCenterPopup()
onAdHocChatButtonClicked: rootStore.openCloseCreateChatView()
onRevealAddressClicked: {
Global.openPopup(communityIntroDialogPopup, {
Global.openPopup(communityMembershipSetupDialogComponent, {
communityId: joinCommunityView.communityId,
isInvitationPending: joinCommunityView.isInvitationPending,
communityName: communityData.name,
@ -187,7 +187,7 @@ StackLayout {
root.openAppSearch()
}
onRevealAddressClicked: {
Global.openPopup(communityIntroDialogPopup, {
Global.openPopup(communityMembershipSetupDialogComponent, {
communityId: chatView.communityId,
isInvitationPending: root.rootStore.isMyCommunityRequestPending(chatView.communityId),
communityName: root.sectionItemModel.name,
@ -266,9 +266,10 @@ StackLayout {
}
Component {
id: communityIntroDialogPopup
CommunityIntroDialog {
id: communityIntroDialog
id: communityMembershipSetupDialogComponent
CommunityMembershipSetupDialog {
id: dialogRoot
property string communityId
@ -278,7 +279,7 @@ StackLayout {
walletAssetsModel: walletAssetsStore.groupedAccountAssetsModel
requirementsCheckPending: root.rootStore.requirementsCheckPending
permissionsModel: {
root.rootStore.prepareTokenModelForCommunity(communityIntroDialog.communityId)
root.rootStore.prepareTokenModelForCommunity(dialogRoot.communityId)
return root.rootStore.permissionsModel
}
assetsModel: root.rootStore.assetsModel
@ -289,9 +290,9 @@ StackLayout {
}
onPrepareForSigning: {
root.rootStore.prepareKeypairsForSigning(communityIntroDialog.communityId, communityIntroDialog.name, sharedAddresses, airdropAddress)
root.rootStore.prepareKeypairsForSigning(dialogRoot.communityId, dialogRoot.name, sharedAddresses, airdropAddress)
communityIntroDialog.keypairSigningModel = root.rootStore.communitiesModuleInst.keypairsSigningModel
dialogRoot.keypairSigningModel = root.rootStore.communitiesModuleInst.keypairsSigningModel
}
onSignProfileKeypairAndAllNonKeycardKeypairs: {
@ -307,12 +308,12 @@ StackLayout {
}
onCancelMembershipRequest: {
root.rootStore.cancelPendingRequest(communityIntroDialog.communityId)
mainViewLoader.item.isInvitationPending = root.rootStore.isMyCommunityRequestPending(communityIntroDialog.communityId)
root.rootStore.cancelPendingRequest(dialogRoot.communityId)
mainViewLoader.item.isInvitationPending = root.rootStore.isMyCommunityRequestPending(dialogRoot.communityId)
}
onSharedAddressesUpdated: {
root.rootStore.updatePermissionsModel(communityIntroDialog.communityId, sharedAddresses)
root.rootStore.updatePermissionsModel(dialogRoot.communityId, sharedAddresses)
}
onClosed: {
@ -323,20 +324,20 @@ StackLayout {
target: root.rootStore.communitiesModuleInst
function onAllSharedAddressesSigned() {
if (communityIntroDialog.profileProvesOwnershipOfSelectedAddresses) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.profileProvesOwnershipOfSelectedAddresses) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (communityIntroDialog.allAddressesToRevealBelongToSingleNonProfileKeypair) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.allAddressesToRevealBelongToSingleNonProfileKeypair) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (!!communityIntroDialog.replaceItem) {
communityIntroDialog.replaceLoader.item.allSigned()
if (!!dialogRoot.replaceItem) {
dialogRoot.replaceLoader.item.allSigned()
}
}
}

View File

@ -502,7 +502,7 @@ Item {
}
onClicked: {
Global.openPopup(communityIntroDialogComponent);
Global.openPopup(communityMembershipSetupDialogComponent);
}
Connections {
@ -530,9 +530,10 @@ Item {
}
Component {
id: communityIntroDialogComponent
CommunityIntroDialog {
id: communityIntroDialog
id: communityMembershipSetupDialogComponent
CommunityMembershipSetupDialog {
id: dialogRoot
isInvitationPending: d.invitationPending
requirementsCheckPending: root.store.requirementsCheckPending
@ -559,7 +560,7 @@ Item {
onPrepareForSigning: {
root.store.prepareKeypairsForSigning(communityData.id, root.store.userProfileInst.name, sharedAddresses, airdropAddress, false)
communityIntroDialog.keypairSigningModel = root.store.communitiesModuleInst.keypairsSigningModel
dialogRoot.keypairSigningModel = root.store.communitiesModuleInst.keypairsSigningModel
}
onSignProfileKeypairAndAllNonKeycardKeypairs: {
@ -592,20 +593,20 @@ Item {
target: root.store.communitiesModuleInst
function onAllSharedAddressesSigned() {
if (communityIntroDialog.profileProvesOwnershipOfSelectedAddresses) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.profileProvesOwnershipOfSelectedAddresses) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (communityIntroDialog.allAddressesToRevealBelongToSingleNonProfileKeypair) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.allAddressesToRevealBelongToSingleNonProfileKeypair) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (!!communityIntroDialog.replaceItem) {
communityIntroDialog.replaceLoader.item.allSigned()
if (!!dialogRoot.replaceItem) {
dialogRoot.replaceLoader.item.allSigned()
}
}
}

View File

@ -21,7 +21,8 @@ StatusListView {
signal leaveCommunityClicked(string community, string communityId, string outroMessage)
signal setCommunityMutedClicked(string communityId, int mutedType)
signal setActiveCommunityClicked(string communityId)
signal showCommunityIntroDialog(string communityId, string name, string introMessage, string imageSrc, int accessType)
signal showCommunityMembershipSetupDialog(string communityId, string name,
string introMessage, string imageSrc, int accessType)
signal cancelMembershipRequest(string communityId)
interactive: false
@ -67,7 +68,8 @@ StatusListView {
size: StatusBaseButton.Size.Small
text: listItem.isInvitationPending ? qsTr("Membership Request Sent") : qsTr("View & Join Community")
visible: listItem.isSpectator
onClicked: root.showCommunityIntroDialog(model.id, model.name, model.introMessage, model.image, model.access)
onClicked: root.showCommunityMembershipSetupDialog(
model.id, model.name, model.introMessage, model.image, model.access)
},
StatusFlatButton {
anchors.verticalCenter: parent.verticalCenter

View File

@ -207,8 +207,8 @@ SettingsContentBase {
root.profileSectionStore.communitiesProfileModule,
null)
}
onShowCommunityIntroDialog: {
Global.openPopup(communityIntroDialogPopup, {
onShowCommunityMembershipSetupDialog: {
Global.openPopup(communityMembershipSetupDialogComponent, {
communityId: communityId,
isInvitationPending: root.rootStore.isMyCommunityRequestPending(communityId),
communityName: name,
@ -222,16 +222,17 @@ SettingsContentBase {
}
}
readonly property var communityIntroDialogPopup: Component {
id: communityIntroDialogPopup
CommunityIntroDialog {
id: communityIntroDialog
readonly property var communityMembershipSetupDialogComponent: Component {
id: communityMembershipSetupDialogComponent
CommunityMembershipSetupDialog {
id: dialogRoot
property string communityId
readonly property var chatStore: ChatStore.RootStore {
chatCommunitySectionModule: {
root.rootStore.mainModuleInst.prepareCommunitySectionModuleForCommunityId(communityIntroDialog.communityId)
root.rootStore.mainModuleInst.prepareCommunitySectionModuleForCommunityId(dialogRoot.communityId)
return root.rootStore.mainModuleInst.getCommunitySectionModule()
}
}
@ -242,7 +243,7 @@ SettingsContentBase {
walletAssetsModel: walletAssetsStore.groupedAccountAssetsModel
requirementsCheckPending: root.rootStore.requirementsCheckPending
permissionsModel: {
root.rootStore.prepareTokenModelForCommunity(communityIntroDialog.communityId)
root.rootStore.prepareTokenModelForCommunity(dialogRoot.communityId)
return root.rootStore.permissionsModel
}
assetsModel: chatStore.assetsModel
@ -253,9 +254,9 @@ SettingsContentBase {
}
onPrepareForSigning: {
chatStore.prepareKeypairsForSigning(communityIntroDialog.communityId, root.rootStore.userProfileInst.name, sharedAddresses, airdropAddress, false)
chatStore.prepareKeypairsForSigning(dialogRoot.communityId, root.rootStore.userProfileInst.name, sharedAddresses, airdropAddress, false)
communityIntroDialog.keypairSigningModel = chatStore.communitiesModuleInst.keypairsSigningModel
dialogRoot.keypairSigningModel = chatStore.communitiesModuleInst.keypairsSigningModel
}
onSignProfileKeypairAndAllNonKeycardKeypairs: {
@ -270,10 +271,10 @@ SettingsContentBase {
chatStore.joinCommunityOrEditSharedAddresses()
}
onCancelMembershipRequest: root.rootStore.cancelPendingRequest(communityIntroDialog.communityId)
onCancelMembershipRequest: root.rootStore.cancelPendingRequest(dialogRoot.communityId)
onSharedAddressesUpdated: {
root.rootStore.updatePermissionsModel(communityIntroDialog.communityId, sharedAddresses)
root.rootStore.updatePermissionsModel(dialogRoot.communityId, sharedAddresses)
}
onClosed: destroy()
@ -282,20 +283,20 @@ SettingsContentBase {
target: chatStore.communitiesModuleInst
function onAllSharedAddressesSigned() {
if (communityIntroDialog.profileProvesOwnershipOfSelectedAddresses) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.profileProvesOwnershipOfSelectedAddresses) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (communityIntroDialog.allAddressesToRevealBelongToSingleNonProfileKeypair) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.allAddressesToRevealBelongToSingleNonProfileKeypair) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (!!communityIntroDialog.replaceItem) {
communityIntroDialog.replaceLoader.item.allSigned()
if (!!dialogRoot.replaceItem) {
dialogRoot.replaceLoader.item.allSigned()
}
}
}

View File

@ -261,7 +261,7 @@ QtObject {
function openCommunityIntroPopup(communityId, name, introMessage,
imageSrc, accessType, isInvitationPending) {
openPopup(communityIntroDialogPopup,
openPopup(communityJoinDialogPopup,
{communityId: communityId,
communityName: name,
introMessage: introMessage,
@ -272,7 +272,7 @@ QtObject {
}
function openCommunityShareAddressesPopup(communityId, name, imageSrc) {
openPopup(communityIntroDialogPopup,
openPopup(communityJoinDialogPopup,
{communityId: communityId,
stackTitle: qsTr("Share addresses with %1's owner").arg(name),
communityName: name,
@ -678,9 +678,11 @@ QtObject {
},
Component {
id: communityIntroDialogPopup
CommunityIntroDialog {
id: communityIntroDialog
id: communityJoinDialogPopup
CommunityMembershipSetupDialog {
id: dialogRoot
property string communityId
requirementsCheckPending: root.rootStore.requirementsCheckPending
@ -690,7 +692,7 @@ QtObject {
walletAssetsModel: walletAssetsStore.groupedAccountAssetsModel
permissionsModel: {
root.rootStore.prepareTokenModelForCommunity(communityIntroDialog.communityId)
root.rootStore.prepareTokenModelForCommunity(dialogRoot.communityId)
return root.rootStore.permissionsModel
}
assetsModel: root.rootStore.assetsModel
@ -701,9 +703,9 @@ QtObject {
}
onPrepareForSigning: {
root.rootStore.prepareKeypairsForSigning(communityIntroDialog.communityId, communityIntroDialog.name, sharedAddresses, airdropAddress, false)
root.rootStore.prepareKeypairsForSigning(dialogRoot.communityId, dialogRoot.name, sharedAddresses, airdropAddress, false)
communityIntroDialog.keypairSigningModel = root.rootStore.communitiesModuleInst.keypairsSigningModel
dialogRoot.keypairSigningModel = root.rootStore.communitiesModuleInst.keypairsSigningModel
}
onSignProfileKeypairAndAllNonKeycardKeypairs: {
@ -718,45 +720,45 @@ QtObject {
root.rootStore.joinCommunityOrEditSharedAddresses()
}
onCancelMembershipRequest: root.rootStore.cancelPendingRequest(communityIntroDialog.communityId)
onCancelMembershipRequest: root.rootStore.cancelPendingRequest(dialogRoot.communityId)
Connections {
target: root.communitiesStore.communitiesModuleInst
function onCommunityAccessRequested(communityId: string) {
if (communityId !== communityIntroDialog.communityId)
if (communityId !== dialogRoot.communityId)
return
root.communitiesStore.spectateCommunity(communityId);
communityIntroDialog.close();
dialogRoot.close();
}
function onCommunityAccessFailed(communityId: string, error: string) {
if (communityId !== communityIntroDialog.communityId)
if (communityId !== dialogRoot.communityId)
return
communityIntroDialog.close();
dialogRoot.close();
}
}
onSharedAddressesUpdated: {
root.rootStore.updatePermissionsModel(communityIntroDialog.communityId, sharedAddresses)
root.rootStore.updatePermissionsModel(dialogRoot.communityId, sharedAddresses)
}
onAboutToShow: { root.rootStore.communityKeyToImport = communityIntroDialog.communityId; }
onAboutToShow: { root.rootStore.communityKeyToImport = dialogRoot.communityId; }
onClosed: { root.rootStore.communityKeyToImport = ""; destroy(); }
Connections {
target: root.rootStore.communitiesModuleInst
function onAllSharedAddressesSigned() {
if (communityIntroDialog.profileProvesOwnershipOfSelectedAddresses) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.profileProvesOwnershipOfSelectedAddresses) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (communityIntroDialog.allAddressesToRevealBelongToSingleNonProfileKeypair) {
communityIntroDialog.joinCommunity()
communityIntroDialog.close()
if (dialogRoot.allAddressesToRevealBelongToSingleNonProfileKeypair) {
dialogRoot.joinCommunity()
dialogRoot.close()
return
}
if (!!communityIntroDialog.replaceItem) {
communityIntroDialog.replaceLoader.item.allSigned()
if (!!dialogRoot.replaceItem) {
dialogRoot.replaceLoader.item.allSigned()
}
}
}
@ -901,7 +903,8 @@ QtObject {
Component {
id: editSharedAddressesPopupComponent
CommunityIntroDialog {
CommunityMembershipSetupDialog {
id: editSharedAddressesPopup
property string communityId

View File

@ -1,34 +1,34 @@
AlertPopup 1.0 AlertPopup.qml
BlockContactConfirmationDialog 1.0 BlockContactConfirmationDialog.qml
ChatCommandsPopup 1.0 ChatCommandsPopup.qml
CommonContactDialog 1.0 CommonContactDialog.qml
BlockContactConfirmationDialog 1.0 BlockContactConfirmationDialog.qml
SettingsDirtyToastMessage 1.0 SettingsDirtyToastMessage.qml
CommunityAssetsInfoPopup 1.0 CommunityAssetsInfoPopup.qml
CommunityMembershipSetupDialog 1.0 CommunityMembershipSetupDialog.qml
ConfirmExternalLinkPopup 1.0 ConfirmExternalLinkPopup.qml
ConfirmationDialog 1.0 ConfirmationDialog.qml
CommunityIntroDialog 1.0 CommunityIntroDialog.qml
ContactVerificationRequestPopup 1.0 ContactVerificationRequestPopup.qml
OutgoingContactVerificationRequestPopup 1.0 OutgoingContactVerificationRequestPopup.qml
DeleteMessageConfirmationPopup 1.0 DeleteMessageConfirmationPopup.qml
DownloadModal 1.0 DownloadModal.qml
DownloadPage 1.0 DownloadPage.qml
InviteFriendsPopup 1.0 InviteFriendsPopup.qml
NicknamePopup 1.0 NicknamePopup.qml
ModalPopup 1.0 ModalPopup.qml
PopupMenu 1.0 PopupMenu.qml
UnblockContactConfirmationDialog 1.0 UnblockContactConfirmationDialog.qml
UserStatusContextMenu 1.0 UserStatusContextMenu.qml
ProfileDialog 1.0 ProfileDialog.qml
GetSyncCodeInstructionsPopup 1.0 GetSyncCodeInstructionsPopup.qml
ImageCropWorkflow 1.0 ImageCropWorkflow.qml
ImportCommunityPopup 1.0 ImportCommunityPopup.qml
SendContactRequestModal 1.0 SendContactRequestModal.qml
GetSyncCodeInstructionsPopup 1.0 GetSyncCodeInstructionsPopup.qml
NoPermissionsToJoinPopup 1.0 NoPermissionsToJoinPopup.qml
RemoveAccountConfirmationPopup 1.0 RemoveAccountConfirmationPopup.qml
RenameGroupPopup 1.0 RenameGroupPopup.qml
DeleteMessageConfirmationPopup 1.0 DeleteMessageConfirmationPopup.qml
UserAgreementPopup 1.0 UserAgreementPopup.qml
AlertPopup 1.0 AlertPopup.qml
ConfirmExternalLinkPopup 1.0 ConfirmExternalLinkPopup.qml
CommunityAssetsInfoPopup 1.0 CommunityAssetsInfoPopup.qml
MarkAsUntrustedPopup 1.0 MarkAsUntrustedPopup.qml
RemoveContactPopup 1.0 RemoveContactPopup.qml
InviteFriendsPopup 1.0 InviteFriendsPopup.qml
MarkAsIDVerifiedDialog 1.0 MarkAsIDVerifiedDialog.qml
MarkAsUntrustedPopup 1.0 MarkAsUntrustedPopup.qml
ModalPopup 1.0 ModalPopup.qml
NicknamePopup 1.0 NicknamePopup.qml
NoPermissionsToJoinPopup 1.0 NoPermissionsToJoinPopup.qml
OutgoingContactVerificationRequestPopup 1.0 OutgoingContactVerificationRequestPopup.qml
PopupMenu 1.0 PopupMenu.qml
ProfileDialog 1.0 ProfileDialog.qml
RemoveAccountConfirmationPopup 1.0 RemoveAccountConfirmationPopup.qml
RemoveContactPopup 1.0 RemoveContactPopup.qml
RemoveIDVerificationDialog 1.0 RemoveIDVerificationDialog.qml
RenameGroupPopup 1.0 RenameGroupPopup.qml
ReviewContactRequestPopup 1.0 ReviewContactRequestPopup.qml
SendContactRequestModal 1.0 SendContactRequestModal.qml
SettingsDirtyToastMessage 1.0 SettingsDirtyToastMessage.qml
UnblockContactConfirmationDialog 1.0 UnblockContactConfirmationDialog.qml
UserAgreementPopup 1.0 UserAgreementPopup.qml
UserStatusContextMenu 1.0 UserStatusContextMenu.qml