fix(JoinCommunity): Join CTA labelling: Change text and remove existing icon

- Change text and remove existing icon.
- Removed unnecessary property `loginType` on different files.
- Renamed signals to be more accurate with existing requirements.

Closes #14098
This commit is contained in:
Noelia 2024-03-27 08:37:28 +01:00 committed by Noelia
parent 085b013f80
commit 3f74ee565a
7 changed files with 15 additions and 49 deletions

View File

@ -41,7 +41,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
property bool isInvitationPending: true
property bool isJoinRequestRejected: false
property bool requiresRequest: false
property int loginType: Constants.LoginType.Biometrics
property var communityHoldingsModel: PermissionsModel.shortPermissionsModel
property var viewOnlyHoldingsModel: PermissionsModel.shortPermissionsModel
@ -117,7 +116,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
joinCommunity: d.joinCommunity
accessType: d.accessType
isInvitationPending: d.isInvitationPending
loginType: d.loginType
// Blur background properties:
membersCount: d.membersCount
@ -147,10 +145,7 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
openCreateChat = !openCreateChat
}
onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()")
onRevealAddressClicked: {
logs.logEvent("JoinCommunityView::onRevealAddressClicked()")
openJoinCommunityDialog()
}
onRequestToJoinClicked: logs.logEvent("JoinCommunityView::onRequestToJoinClicked()")
onInvitationPendingClicked: logs.logEvent("JoinCommunityView::onInvitationPendingClicked()")
}
}
@ -280,21 +275,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
onViewAndPostHoldingsModelChanged: d.viewAndPostHoldingsModel = viewAndPostHoldingsModel
onModerateHoldingsModelChanged: d.moderateHoldingsModel = moderateHoldingsModel
}
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Login type"
}
ComboBox {
id: loginTypeComboBox
Layout.fillWidth: true
model: ["Password","Biometrics","Keycard"]
onActivated: d.loginType = currentIndex
Component.onCompleted: currentIndex = d.loginType
}
}
}
}
}

View File

@ -86,7 +86,7 @@ SplitView {
viewAndPostHoldingsModel: d.viewAndPostHoldingsModel
moderateHoldingsModel: d.moderateHoldingsModel
onRevealAddressClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRevealAddressClicked()")
onRequestToJoinClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRequestToJoinClicked()")
onInvitationPendingClicked: logs.logEvent("JoinPermissionsOverlayPanel::onInvitationPendingClicked()")
}
}

View File

@ -115,10 +115,9 @@ StackLayout {
notificationCount: activityCenterStore.unreadNotificationsCount
hasUnseenNotifications: activityCenterStore.hasUnseenNotifications
openCreateChat: rootStore.openCreateChat
loginType: root.rootStore.loginType
onNotificationButtonClicked: Global.openActivityCenterPopup()
onAdHocChatButtonClicked: rootStore.openCloseCreateChatView()
onRevealAddressClicked: {
onRequestToJoinClicked: {
Global.openPopup(communityMembershipSetupDialogComponent, {
communityId: joinCommunityView.communityId,
isInvitationPending: joinCommunityView.isInvitationPending,
@ -186,7 +185,7 @@ StackLayout {
onOpenAppSearch: {
root.openAppSearch()
}
onRevealAddressClicked: {
onRequestToJoinClicked: {
Global.openPopup(communityMembershipSetupDialogComponent, {
communityId: chatView.communityId,
isInvitationPending: root.rootStore.isMyCommunityRequestPending(chatView.communityId),

View File

@ -117,7 +117,7 @@ StatusSectionLayout {
signal profileButtonClicked()
signal openAppSearch()
signal revealAddressClicked
signal requestToJoinClicked
signal invitationPendingClicked
Connections {
@ -261,7 +261,7 @@ StatusSectionLayout {
requirementsMet: (viewOnlyPermissionsSatisfied && viewOnlyPermissionsModel.count > 0) ||
(viewAndPostPermissionsSatisfied && viewAndPostPermissionsModel.count > 0)
requirementsCheckPending: root.chatContentModule.permissionsCheckOngoing
onRevealAddressClicked: root.revealAddressClicked()
onRequestToJoinClicked: root.requestToJoinClicked()
onInvitationPendingClicked: root.invitationPendingClicked()
}
}

View File

@ -19,7 +19,6 @@ ColumnLayout {
property bool isInvitationPending: false
property bool isJoinRequestRejected: false
property bool requiresRequest: false
property alias loginType: overlayPanel.loginType
property bool requirementsMet: true
property bool requirementsCheckPending: false
@ -35,7 +34,7 @@ ColumnLayout {
property string listUsersText
property var messagesModel
signal revealAddressClicked
signal requestToJoinClicked
signal invitationPendingClicked
spacing: 0
@ -155,7 +154,7 @@ ColumnLayout {
assetsModel: root.assetsModel
collectiblesModel: root.collectiblesModel
onRevealAddressClicked: root.revealAddressClicked()
onRequestToJoinClicked: root.requestToJoinClicked()
onInvitationPendingClicked: root.invitationPendingClicked()
}
}

View File

@ -30,34 +30,23 @@ Control {
property var viewAndPostHoldingsModel
property var moderateHoldingsModel
property bool showOnlyPanels: false
property int loginType: Constants.LoginType.Password
property var assetsModel
property var collectiblesModel
signal revealAddressClicked
signal requestToJoinClicked
signal invitationPendingClicked
QtObject {
id: d
readonly property string communityRequirementsNotMetText: qsTr("Membership requirements not met")
readonly property string communityRevealAddressText: qsTr("Reveal your address to join")
readonly property string communityRevealAddressWithRequestText: qsTr("Reveal your address and request to join")
readonly property string communityRequestToJoinText: qsTr("Request to join Community")
readonly property string communityMembershipRequestPendingText: qsTr("Membership Request Pending...")
readonly property string channelRequirementsNotMetText: qsTr("Channel requirements not met")
readonly property string channelRevealAddressText: qsTr("Reveal your address to enter")
readonly property string channelMembershipRequestPendingText: qsTr("Channel Membership Request Pending...")
readonly property string memberchipRequestRejectedText: qsTr("Membership Request Rejected")
function getInvitationPendingText() {
return root.joinCommunity ? d.communityMembershipRequestPendingText : d.channelMembershipRequestPendingText
}
function getRevealAddressText() {
return root.joinCommunity ? (root.requiresRequest ? d.communityRevealAddressWithRequestText : d.communityRevealAddressText) : d.channelRevealAddressText
}
function filterPermissions(model) {
return !!model && (model.tokenCriteriaMet || !model.isPrivate)
}
@ -150,11 +139,11 @@ Control {
StatusButton {
Layout.alignment: Qt.AlignHCenter
visible: !root.showOnlyPanels && !root.isJoinRequestRejected && root.requiresRequest
text: root.isInvitationPending ? d.getInvitationPendingText() : d.getRevealAddressText()
icon.name: root.isInvitationPending ? "" : Constants.authenticationIconByType[root.loginType]
text: root.isInvitationPending ? (root.joinCommunity ? d.communityMembershipRequestPendingText : d.channelMembershipRequestPendingText)
: d.communityRequestToJoinText
font.pixelSize: 13
enabled: root.requirementsMet || d.communityPermissionsModel.count === 0
onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.revealAddressClicked()
onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.requestToJoinClicked()
}
StatusBaseText {

View File

@ -37,7 +37,6 @@ StatusSectionLayout {
property bool requirementsCheckPending: false
property bool isJoinRequestRejected: false
property bool requiresRequest: false
property alias loginType: joinCommunityCenterPanel.loginType
property var communityHoldingsModel
property var viewOnlyHoldingsModel
@ -56,7 +55,7 @@ StatusSectionLayout {
signal infoButtonClicked
signal adHocChatButtonClicked
signal revealAddressClicked
signal requestToJoinClicked
signal invitationPendingClicked
@ -146,7 +145,7 @@ StatusSectionLayout {
listUsersText: root.listUsersText
messagesModel: root.messagesModel
onRevealAddressClicked: root.revealAddressClicked()
onRequestToJoinClicked: root.requestToJoinClicked()
onInvitationPendingClicked: root.invitationPendingClicked()
}