2023-01-05 20:03:18 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
import shared.popups 1.0
|
2023-02-03 10:06:45 +00:00
|
|
|
import utils 1.0
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2024-01-24 16:35:53 +00:00
|
|
|
import AppLayouts.Wallet.stores 1.0
|
|
|
|
|
2023-01-05 20:03:18 +00:00
|
|
|
SplitView {
|
|
|
|
SplitView {
|
2024-01-24 16:35:53 +00:00
|
|
|
id: root
|
|
|
|
|
2023-01-05 20:03:18 +00:00
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
2024-01-24 16:35:53 +00:00
|
|
|
readonly property WalletAssetsStore walletAssetStore: WalletAssetsStore {
|
|
|
|
assetsWithFilteredBalances: groupedAccountsAssetsModel
|
|
|
|
}
|
|
|
|
|
2024-03-27 12:48:17 +00:00
|
|
|
function openDialog() {
|
|
|
|
popupComponent.createObject(popupBg)
|
|
|
|
}
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2024-03-27 12:48:17 +00:00
|
|
|
Component.onCompleted: openDialog()
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2024-03-27 12:48:17 +00:00
|
|
|
Component {
|
|
|
|
id: popupComponent
|
2024-03-25 17:32:33 +00:00
|
|
|
CommunityMembershipSetupDialog {
|
2023-01-05 20:03:18 +00:00
|
|
|
anchors.centerIn: parent
|
2024-03-25 17:19:17 +00:00
|
|
|
modal: false
|
2024-03-27 12:48:17 +00:00
|
|
|
visible: true
|
2024-03-25 17:19:17 +00:00
|
|
|
closePolicy: Popup.NoAutoClose
|
|
|
|
|
2024-03-25 18:39:45 +00:00
|
|
|
isEditMode: ctrlIsEditMode.checked
|
2024-03-27 12:48:17 +00:00
|
|
|
communityName: ctrlCommunityName.text
|
|
|
|
communityIcon: {
|
|
|
|
if (ctrlIconStatus.checked)
|
|
|
|
return ModelsData.icons.status
|
|
|
|
if (ctrlIconCryptoPunks.checked)
|
|
|
|
return ModelsData.icons.cryptPunks
|
|
|
|
if (ctrlIconRarible.checked)
|
|
|
|
return ModelsData.icons.rarible
|
|
|
|
if (ctrlIconNone.checked)
|
|
|
|
return ""
|
|
|
|
}
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2024-03-27 12:48:17 +00:00
|
|
|
introMessage: ctrlIntro.text.arg(communityName)
|
2024-03-25 18:39:45 +00:00
|
|
|
|
|
|
|
isInvitationPending: ctrlIsInvitationPending.checked
|
|
|
|
requirementsCheckPending: ctrlRequirementsCheckPending.checked
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2023-07-04 15:11:41 +00:00
|
|
|
walletAccountsModel: WalletAccountsModel {}
|
2024-01-24 16:35:53 +00:00
|
|
|
walletAssetsModel: root.walletAssetStore.groupedAccountAssetsModel
|
2024-03-27 12:48:17 +00:00
|
|
|
permissionsModel: ctrlPermissionsModel.currentValue
|
2023-07-04 15:11:41 +00:00
|
|
|
assetsModel: AssetsModel {}
|
|
|
|
collectiblesModel: CollectiblesModel {}
|
2023-01-05 20:03:18 +00:00
|
|
|
|
2024-03-25 17:32:33 +00:00
|
|
|
onCancelMembershipRequest: logs.logEvent("CommunityMembershipSetupDialog::onCancelMembershipRequest()")
|
2023-11-03 11:19:56 +00:00
|
|
|
|
2024-03-25 17:32:33 +00:00
|
|
|
onPrepareForSigning: logs.logEvent("CommunityMembershipSetupDialog::onPrepareForSigning", ["airdropAddress", "sharedAddresses"], arguments)
|
|
|
|
onJoinCommunity: logs.logEvent("CommunityMembershipSetupDialog::onJoinCommunity")
|
|
|
|
onEditRevealedAddresses: logs.logEvent("CommunityMembershipSetupDialog::editRevealedAddresses")
|
2024-03-25 18:39:45 +00:00
|
|
|
onSignProfileKeypairAndAllNonKeycardKeypairs: logs.logEvent("CommunityMembershipSetupDialog::onSignProfileKeypairAndAllNonKeycardKeypairs")
|
2024-03-25 17:32:33 +00:00
|
|
|
onSignSharedAddressesForKeypair: logs.logEvent("CommunityMembershipSetupDialog::onSignSharedAddressesForKeypair", ["keyUid"], arguments)
|
|
|
|
onSharedAddressesUpdated: logs.logEvent("CommunityMembershipSetupDialog::onSharedAddressesUpdated", ["sharedAddresses"], arguments)
|
2024-01-24 16:35:53 +00:00
|
|
|
getCurrencyAmount: function (balance, symbol) {
|
|
|
|
return ({
|
|
|
|
amount: balance,
|
|
|
|
symbol: symbol.toUpperCase(),
|
|
|
|
displayDecimals: 2,
|
|
|
|
stripTrailingZeroes: false
|
|
|
|
})
|
|
|
|
}
|
2023-01-05 20:03:18 +00:00
|
|
|
}
|
2024-03-27 12:48:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
PopupBackground {
|
|
|
|
id: popupBg
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Reopen"
|
|
|
|
|
|
|
|
onClicked: root.openDialog()
|
|
|
|
}
|
2023-01-05 20:03:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
2023-02-17 10:25:48 +00:00
|
|
|
text: "Community name"
|
2023-01-05 20:03:18 +00:00
|
|
|
font.weight: Font.Bold
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlCommunityName
|
2023-01-05 20:03:18 +00:00
|
|
|
Layout.fillWidth: true
|
2024-03-27 12:48:17 +00:00
|
|
|
text: "Status"
|
2023-01-05 20:03:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
2024-03-27 12:48:17 +00:00
|
|
|
text: "Intro"
|
2023-01-05 20:03:18 +00:00
|
|
|
font.weight: Font.Bold
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlIntro
|
2023-01-05 20:03:18 +00:00
|
|
|
Layout.fillWidth: true
|
2024-03-27 12:48:17 +00:00
|
|
|
text: "%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.
|
|
|
|
|
|
|
|
1. Ut enim ad minim veniam
|
|
|
|
2. Excepteur sint occaecat cupidatat non proident
|
|
|
|
3. Duis aute irure
|
|
|
|
4. Dolore eu fugiat nulla pariatur
|
|
|
|
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."
|
2023-01-05 20:03:18 +00:00
|
|
|
}
|
|
|
|
|
2023-02-03 10:06:45 +00:00
|
|
|
ColumnLayout {
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
text: "Icon:"
|
2024-03-25 18:39:45 +00:00
|
|
|
font.weight: Font.Bold
|
2023-02-03 10:06:45 +00:00
|
|
|
}
|
|
|
|
RadioButton {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlIconStatus
|
2023-02-03 10:06:45 +00:00
|
|
|
checked: true
|
|
|
|
text: "Status"
|
|
|
|
}
|
|
|
|
RadioButton {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlIconCryptoPunks
|
2023-02-03 10:06:45 +00:00
|
|
|
text: "Crypto Punks"
|
|
|
|
}
|
|
|
|
RadioButton {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlIconRarible
|
2023-02-03 10:06:45 +00:00
|
|
|
text: "Rarible"
|
|
|
|
}
|
|
|
|
RadioButton {
|
2024-03-27 12:48:17 +00:00
|
|
|
id: ctrlIconNone
|
2023-02-03 10:06:45 +00:00
|
|
|
text: "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-25 18:39:45 +00:00
|
|
|
CheckBox {
|
|
|
|
id: ctrlIsInvitationPending
|
|
|
|
text: "Is invitation pending"
|
|
|
|
}
|
2023-02-03 10:06:45 +00:00
|
|
|
|
2024-03-25 18:39:45 +00:00
|
|
|
CheckBox {
|
|
|
|
id: ctrlIsEditMode
|
2024-03-27 12:48:17 +00:00
|
|
|
visible: !ctrlIsInvitationPending.checked
|
2024-03-25 18:39:45 +00:00
|
|
|
text: "Is edit mode"
|
2023-02-03 10:06:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
2024-03-27 12:48:17 +00:00
|
|
|
visible: !ctrlIsInvitationPending.checked
|
2023-02-03 10:06:45 +00:00
|
|
|
|
2024-03-27 12:48:17 +00:00
|
|
|
RowLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.leftMargin: 12
|
|
|
|
Label {
|
|
|
|
text: "Permissions:"
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
id: ctrlPermissionsModel
|
|
|
|
textRole: "text"
|
|
|
|
valueRole: "value"
|
|
|
|
model: [
|
|
|
|
{ value: PermissionsModel.complexCombinedPermissionsModel, text: "complexCombined" },
|
|
|
|
{ value: PermissionsModel.complexCombinedPermissionsModelNotMet, text: "complexCombinedNotMet" },
|
|
|
|
{ value: PermissionsModel.complexPermissionsModel, text: "complex" },
|
|
|
|
{ value: PermissionsModel.complexPermissionsModelNotMet, text: "complexNotMet" },
|
|
|
|
{ value: PermissionsModel.channelsOnlyPermissionsModel, text: "channelsOnly" },
|
|
|
|
{ value: PermissionsModel.channelsOnlyPermissionsModelNotMet, text: "channelsOnlyNotMet" },
|
|
|
|
{ value: null, text: "null" }
|
|
|
|
]
|
|
|
|
}
|
2023-01-05 20:03:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-25 18:39:45 +00:00
|
|
|
CheckBox {
|
2024-03-27 12:48:17 +00:00
|
|
|
Layout.leftMargin: 12
|
2024-03-25 18:39:45 +00:00
|
|
|
id: ctrlRequirementsCheckPending
|
2024-03-27 12:48:17 +00:00
|
|
|
visible: !ctrlIsInvitationPending.checked
|
2024-03-25 18:39:45 +00:00
|
|
|
text: "Requirements check pending"
|
2023-07-04 15:11:41 +00:00
|
|
|
}
|
|
|
|
|
2023-01-05 20:03:18 +00:00
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-31 12:21:14 +00:00
|
|
|
// category: Popups
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=31461%3A563897&mode=dev
|