fix(Shared Addresses): Requirements check pending indicator

- update shared addresses dialog to avoid small jumps when
selecting/unselecting accounts due to requirements check text displayed
- display the pending text and spinner next to the Permissions header

Fixes #14103
This commit is contained in:
Lukáš Tinkl 2024-03-25 19:39:45 +01:00 committed by Lukáš Tinkl
parent fae7e82e0a
commit 085b013f80
3 changed files with 43 additions and 40 deletions

View File

@ -46,6 +46,7 @@ SplitView {
modal: false modal: false
closePolicy: Popup.NoAutoClose closePolicy: Popup.NoAutoClose
isEditMode: ctrlIsEditMode.checked
communityName: "Status" communityName: "Status"
communityIcon: ModelsData.icons.status communityIcon: ModelsData.icons.status
introMessage: "%1 sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. introMessage: "%1 sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
@ -56,8 +57,10 @@ SplitView {
4. Dolore eu fugiat nulla pariatur 4. Dolore eu fugiat nulla pariatur
5. 🚗 consectetur adipiscing elit 5. 🚗 consectetur adipiscing elit
Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.".arg(dialog.name) Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.".arg(dialog.communityName)
requirementsCheckPending: false
isInvitationPending: ctrlIsInvitationPending.checked
requirementsCheckPending: ctrlRequirementsCheckPending.checked
walletAccountsModel: WalletAccountsModel {} walletAccountsModel: WalletAccountsModel {}
walletAssetsModel: root.walletAssetStore.groupedAccountAssetsModel walletAssetsModel: root.walletAssetStore.groupedAccountAssetsModel
@ -71,7 +74,7 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
onPrepareForSigning: logs.logEvent("CommunityMembershipSetupDialog::onPrepareForSigning", ["airdropAddress", "sharedAddresses"], arguments) onPrepareForSigning: logs.logEvent("CommunityMembershipSetupDialog::onPrepareForSigning", ["airdropAddress", "sharedAddresses"], arguments)
onJoinCommunity: logs.logEvent("CommunityMembershipSetupDialog::onJoinCommunity") onJoinCommunity: logs.logEvent("CommunityMembershipSetupDialog::onJoinCommunity")
onEditRevealedAddresses: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses") onEditRevealedAddresses: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses")
onSignProfileKeypairAndAllNonKeycardKeypairs: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses") onSignProfileKeypairAndAllNonKeycardKeypairs: logs.logEvent("CommunityMembershipSetupDialog::onSignProfileKeypairAndAllNonKeycardKeypairs")
onSignSharedAddressesForKeypair: logs.logEvent("CommunityMembershipSetupDialog::onSignSharedAddressesForKeypair", ["keyUid"], arguments) onSignSharedAddressesForKeypair: logs.logEvent("CommunityMembershipSetupDialog::onSignSharedAddressesForKeypair", ["keyUid"], arguments)
onSharedAddressesUpdated: logs.logEvent("CommunityMembershipSetupDialog::onSharedAddressesUpdated", ["sharedAddresses"], arguments) onSharedAddressesUpdated: logs.logEvent("CommunityMembershipSetupDialog::onSharedAddressesUpdated", ["sharedAddresses"], arguments)
getCurrencyAmount: function (balance, symbol) { getCurrencyAmount: function (balance, symbol) {
@ -110,8 +113,8 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
TextField { TextField {
Layout.fillWidth: true Layout.fillWidth: true
text: dialog.name text: dialog.communityName
onTextChanged: dialog.name = text onTextChanged: dialog.communityName = text
} }
Label { Label {
@ -130,36 +133,36 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
text: "Icon:" text: "Icon:"
font.weight: Font.Bold
} }
RadioButton { RadioButton {
checked: true checked: true
text: "Status" text: "Status"
onCheckedChanged: if(checked) dialog.imageSrc = ModelsData.icons.status onCheckedChanged: if(checked) dialog.communityIcon = ModelsData.icons.status
} }
RadioButton { RadioButton {
text: "Crypto Punks" text: "Crypto Punks"
onCheckedChanged: if(checked) dialog.imageSrc = ModelsData.icons.cryptPunks onCheckedChanged: if(checked) dialog.communityIcon = ModelsData.icons.cryptPunks
} }
RadioButton { RadioButton {
text: "Rarible" text: "Rarible"
onCheckedChanged: if(checked) dialog.imageSrc = ModelsData.icons.rarible onCheckedChanged: if(checked) dialog.communityIcon = ModelsData.icons.rarible
} }
RadioButton { RadioButton {
text: "None" text: "None"
onCheckedChanged: if(checked) dialog.imageSrc = "" onCheckedChanged: if(checked) dialog.communityIcon = ""
} }
} }
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Is invitation pending:"
}
CheckBox { CheckBox {
checked: dialog.isInvitationPending id: ctrlIsInvitationPending
onCheckedChanged: dialog.isInvitationPending = checked text: "Is invitation pending"
} }
CheckBox {
id: ctrlIsEditMode
visible: !dialog.isInvitationPending
text: "Is edit mode"
} }
ColumnLayout { ColumnLayout {
@ -180,18 +183,10 @@ Nemo enim 😋 ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
} }
} }
ColumnLayout { CheckBox {
visible: dialog.accessType == Constants.communityChatOnRequestAccess && !dialog.isInvitationPending id: ctrlRequirementsCheckPending
Label { visible: !dialog.isInvitationPending && dialog.accessType == Constants.communityChatOnRequestAccess
Layout.fillWidth: true text: "Requirements check pending"
text: "Login type"
}
ComboBox {
id: ctrlLoginType
Layout.fillWidth: true
model: ["Password","Biometrics","Keycard"]
}
} }
Item { Item {

View File

@ -207,16 +207,6 @@ Control {
} }
} }
RequirementsCheckPendingLoader {
visible: root.requirementsCheckPending
Layout.alignment: Qt.AlignHCenter
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: Style.current.padding
}
// divider with top rounded corners + drop shadow // divider with top rounded corners + drop shadow
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
@ -244,6 +234,7 @@ Control {
permissionsModel: root.permissionsModel permissionsModel: root.permissionsModel
assetsModel: root.assetsModel assetsModel: root.assetsModel
collectiblesModel: root.collectiblesModel collectiblesModel: root.collectiblesModel
requirementsCheckPending: root.requirementsCheckPending
communityName: root.communityName communityName: root.communityName
communityIcon: root.communityIcon communityIcon: root.communityIcon

View File

@ -27,6 +27,8 @@ Rectangle {
property var assetsModel property var assetsModel
property var collectiblesModel property var collectiblesModel
property bool requirementsCheckPending
readonly property bool lostPermissionToJoin: d.lostPermissionToJoin readonly property bool lostPermissionToJoin: d.lostPermissionToJoin
readonly property bool lostChannelPermissions: d.lostChannelPermissions readonly property bool lostChannelPermissions: d.lostChannelPermissions
@ -143,6 +145,21 @@ Rectangle {
font.weight: Font.Medium font.weight: Font.Medium
text: qsTr("Permissions") text: qsTr("Permissions")
} }
Item { Layout.fillWidth: true }
RowLayout {
Layout.rightMargin: Style.current.halfPadding
spacing: 4
visible: root.requirementsCheckPending
StatusBaseText {
text: qsTr("Updating eligibility")
font.pixelSize: Style.current.tertiaryTextFontSize
color: Theme.palette.baseColor1
}
StatusLoadingIndicator {
Layout.preferredWidth: 12
Layout.preferredHeight: 12
}
}
} }
// permission types // permission types