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:
parent
085b013f80
commit
3f74ee565a
|
@ -41,7 +41,6 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
|
||||||
property bool isInvitationPending: true
|
property bool isInvitationPending: true
|
||||||
property bool isJoinRequestRejected: false
|
property bool isJoinRequestRejected: false
|
||||||
property bool requiresRequest: false
|
property bool requiresRequest: false
|
||||||
property int loginType: Constants.LoginType.Biometrics
|
|
||||||
|
|
||||||
property var communityHoldingsModel: PermissionsModel.shortPermissionsModel
|
property var communityHoldingsModel: PermissionsModel.shortPermissionsModel
|
||||||
property var viewOnlyHoldingsModel: 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
|
joinCommunity: d.joinCommunity
|
||||||
accessType: d.accessType
|
accessType: d.accessType
|
||||||
isInvitationPending: d.isInvitationPending
|
isInvitationPending: d.isInvitationPending
|
||||||
loginType: d.loginType
|
|
||||||
|
|
||||||
// Blur background properties:
|
// Blur background properties:
|
||||||
membersCount: d.membersCount
|
membersCount: d.membersCount
|
||||||
|
@ -147,10 +145,7 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
|
||||||
openCreateChat = !openCreateChat
|
openCreateChat = !openCreateChat
|
||||||
}
|
}
|
||||||
onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()")
|
onNotificationButtonClicked: logs.logEvent("JoinCommunityView::onNotificationButtonClicked()")
|
||||||
onRevealAddressClicked: {
|
onRequestToJoinClicked: logs.logEvent("JoinCommunityView::onRequestToJoinClicked()")
|
||||||
logs.logEvent("JoinCommunityView::onRevealAddressClicked()")
|
|
||||||
openJoinCommunityDialog()
|
|
||||||
}
|
|
||||||
onInvitationPendingClicked: logs.logEvent("JoinCommunityView::onInvitationPendingClicked()")
|
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
|
onViewAndPostHoldingsModelChanged: d.viewAndPostHoldingsModel = viewAndPostHoldingsModel
|
||||||
onModerateHoldingsModelChanged: d.moderateHoldingsModel = moderateHoldingsModel
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ SplitView {
|
||||||
viewAndPostHoldingsModel: d.viewAndPostHoldingsModel
|
viewAndPostHoldingsModel: d.viewAndPostHoldingsModel
|
||||||
moderateHoldingsModel: d.moderateHoldingsModel
|
moderateHoldingsModel: d.moderateHoldingsModel
|
||||||
|
|
||||||
onRevealAddressClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRevealAddressClicked()")
|
onRequestToJoinClicked: logs.logEvent("JoinPermissionsOverlayPanel::onRequestToJoinClicked()")
|
||||||
onInvitationPendingClicked: logs.logEvent("JoinPermissionsOverlayPanel::onInvitationPendingClicked()")
|
onInvitationPendingClicked: logs.logEvent("JoinPermissionsOverlayPanel::onInvitationPendingClicked()")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,10 +115,9 @@ StackLayout {
|
||||||
notificationCount: activityCenterStore.unreadNotificationsCount
|
notificationCount: activityCenterStore.unreadNotificationsCount
|
||||||
hasUnseenNotifications: activityCenterStore.hasUnseenNotifications
|
hasUnseenNotifications: activityCenterStore.hasUnseenNotifications
|
||||||
openCreateChat: rootStore.openCreateChat
|
openCreateChat: rootStore.openCreateChat
|
||||||
loginType: root.rootStore.loginType
|
|
||||||
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
onNotificationButtonClicked: Global.openActivityCenterPopup()
|
||||||
onAdHocChatButtonClicked: rootStore.openCloseCreateChatView()
|
onAdHocChatButtonClicked: rootStore.openCloseCreateChatView()
|
||||||
onRevealAddressClicked: {
|
onRequestToJoinClicked: {
|
||||||
Global.openPopup(communityMembershipSetupDialogComponent, {
|
Global.openPopup(communityMembershipSetupDialogComponent, {
|
||||||
communityId: joinCommunityView.communityId,
|
communityId: joinCommunityView.communityId,
|
||||||
isInvitationPending: joinCommunityView.isInvitationPending,
|
isInvitationPending: joinCommunityView.isInvitationPending,
|
||||||
|
@ -186,7 +185,7 @@ StackLayout {
|
||||||
onOpenAppSearch: {
|
onOpenAppSearch: {
|
||||||
root.openAppSearch()
|
root.openAppSearch()
|
||||||
}
|
}
|
||||||
onRevealAddressClicked: {
|
onRequestToJoinClicked: {
|
||||||
Global.openPopup(communityMembershipSetupDialogComponent, {
|
Global.openPopup(communityMembershipSetupDialogComponent, {
|
||||||
communityId: chatView.communityId,
|
communityId: chatView.communityId,
|
||||||
isInvitationPending: root.rootStore.isMyCommunityRequestPending(chatView.communityId),
|
isInvitationPending: root.rootStore.isMyCommunityRequestPending(chatView.communityId),
|
||||||
|
|
|
@ -117,7 +117,7 @@ StatusSectionLayout {
|
||||||
signal profileButtonClicked()
|
signal profileButtonClicked()
|
||||||
signal openAppSearch()
|
signal openAppSearch()
|
||||||
|
|
||||||
signal revealAddressClicked
|
signal requestToJoinClicked
|
||||||
signal invitationPendingClicked
|
signal invitationPendingClicked
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -261,7 +261,7 @@ StatusSectionLayout {
|
||||||
requirementsMet: (viewOnlyPermissionsSatisfied && viewOnlyPermissionsModel.count > 0) ||
|
requirementsMet: (viewOnlyPermissionsSatisfied && viewOnlyPermissionsModel.count > 0) ||
|
||||||
(viewAndPostPermissionsSatisfied && viewAndPostPermissionsModel.count > 0)
|
(viewAndPostPermissionsSatisfied && viewAndPostPermissionsModel.count > 0)
|
||||||
requirementsCheckPending: root.chatContentModule.permissionsCheckOngoing
|
requirementsCheckPending: root.chatContentModule.permissionsCheckOngoing
|
||||||
onRevealAddressClicked: root.revealAddressClicked()
|
onRequestToJoinClicked: root.requestToJoinClicked()
|
||||||
onInvitationPendingClicked: root.invitationPendingClicked()
|
onInvitationPendingClicked: root.invitationPendingClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ ColumnLayout {
|
||||||
property bool isInvitationPending: false
|
property bool isInvitationPending: false
|
||||||
property bool isJoinRequestRejected: false
|
property bool isJoinRequestRejected: false
|
||||||
property bool requiresRequest: false
|
property bool requiresRequest: false
|
||||||
property alias loginType: overlayPanel.loginType
|
|
||||||
|
|
||||||
property bool requirementsMet: true
|
property bool requirementsMet: true
|
||||||
property bool requirementsCheckPending: false
|
property bool requirementsCheckPending: false
|
||||||
|
@ -35,7 +34,7 @@ ColumnLayout {
|
||||||
property string listUsersText
|
property string listUsersText
|
||||||
property var messagesModel
|
property var messagesModel
|
||||||
|
|
||||||
signal revealAddressClicked
|
signal requestToJoinClicked
|
||||||
signal invitationPendingClicked
|
signal invitationPendingClicked
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
@ -155,7 +154,7 @@ ColumnLayout {
|
||||||
assetsModel: root.assetsModel
|
assetsModel: root.assetsModel
|
||||||
collectiblesModel: root.collectiblesModel
|
collectiblesModel: root.collectiblesModel
|
||||||
|
|
||||||
onRevealAddressClicked: root.revealAddressClicked()
|
onRequestToJoinClicked: root.requestToJoinClicked()
|
||||||
onInvitationPendingClicked: root.invitationPendingClicked()
|
onInvitationPendingClicked: root.invitationPendingClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,34 +30,23 @@ Control {
|
||||||
property var viewAndPostHoldingsModel
|
property var viewAndPostHoldingsModel
|
||||||
property var moderateHoldingsModel
|
property var moderateHoldingsModel
|
||||||
property bool showOnlyPanels: false
|
property bool showOnlyPanels: false
|
||||||
property int loginType: Constants.LoginType.Password
|
|
||||||
|
|
||||||
property var assetsModel
|
property var assetsModel
|
||||||
property var collectiblesModel
|
property var collectiblesModel
|
||||||
|
|
||||||
signal revealAddressClicked
|
signal requestToJoinClicked
|
||||||
signal invitationPendingClicked
|
signal invitationPendingClicked
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
|
|
||||||
readonly property string communityRequirementsNotMetText: qsTr("Membership requirements not met")
|
readonly property string communityRequirementsNotMetText: qsTr("Membership requirements not met")
|
||||||
readonly property string communityRevealAddressText: qsTr("Reveal your address to join")
|
readonly property string communityRequestToJoinText: qsTr("Request to join Community")
|
||||||
readonly property string communityRevealAddressWithRequestText: qsTr("Reveal your address and request to join")
|
|
||||||
readonly property string communityMembershipRequestPendingText: qsTr("Membership Request Pending...")
|
readonly property string communityMembershipRequestPendingText: qsTr("Membership Request Pending...")
|
||||||
readonly property string channelRequirementsNotMetText: qsTr("Channel requirements not met")
|
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 channelMembershipRequestPendingText: qsTr("Channel Membership Request Pending...")
|
||||||
readonly property string memberchipRequestRejectedText: qsTr("Membership Request Rejected")
|
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) {
|
function filterPermissions(model) {
|
||||||
return !!model && (model.tokenCriteriaMet || !model.isPrivate)
|
return !!model && (model.tokenCriteriaMet || !model.isPrivate)
|
||||||
}
|
}
|
||||||
|
@ -150,11 +139,11 @@ Control {
|
||||||
StatusButton {
|
StatusButton {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
visible: !root.showOnlyPanels && !root.isJoinRequestRejected && root.requiresRequest
|
visible: !root.showOnlyPanels && !root.isJoinRequestRejected && root.requiresRequest
|
||||||
text: root.isInvitationPending ? d.getInvitationPendingText() : d.getRevealAddressText()
|
text: root.isInvitationPending ? (root.joinCommunity ? d.communityMembershipRequestPendingText : d.channelMembershipRequestPendingText)
|
||||||
icon.name: root.isInvitationPending ? "" : Constants.authenticationIconByType[root.loginType]
|
: d.communityRequestToJoinText
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
enabled: root.requirementsMet || d.communityPermissionsModel.count === 0
|
enabled: root.requirementsMet || d.communityPermissionsModel.count === 0
|
||||||
onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.revealAddressClicked()
|
onClicked: root.isInvitationPending ? root.invitationPendingClicked() : root.requestToJoinClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
|
|
@ -37,7 +37,6 @@ StatusSectionLayout {
|
||||||
property bool requirementsCheckPending: false
|
property bool requirementsCheckPending: false
|
||||||
property bool isJoinRequestRejected: false
|
property bool isJoinRequestRejected: false
|
||||||
property bool requiresRequest: false
|
property bool requiresRequest: false
|
||||||
property alias loginType: joinCommunityCenterPanel.loginType
|
|
||||||
|
|
||||||
property var communityHoldingsModel
|
property var communityHoldingsModel
|
||||||
property var viewOnlyHoldingsModel
|
property var viewOnlyHoldingsModel
|
||||||
|
@ -56,7 +55,7 @@ StatusSectionLayout {
|
||||||
|
|
||||||
signal infoButtonClicked
|
signal infoButtonClicked
|
||||||
signal adHocChatButtonClicked
|
signal adHocChatButtonClicked
|
||||||
signal revealAddressClicked
|
signal requestToJoinClicked
|
||||||
signal invitationPendingClicked
|
signal invitationPendingClicked
|
||||||
|
|
||||||
|
|
||||||
|
@ -146,7 +145,7 @@ StatusSectionLayout {
|
||||||
listUsersText: root.listUsersText
|
listUsersText: root.listUsersText
|
||||||
messagesModel: root.messagesModel
|
messagesModel: root.messagesModel
|
||||||
|
|
||||||
onRevealAddressClicked: root.revealAddressClicked()
|
onRequestToJoinClicked: root.requestToJoinClicked()
|
||||||
onInvitationPendingClicked: root.invitationPendingClicked()
|
onInvitationPendingClicked: root.invitationPendingClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue