2023-06-22 21:24:30 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.views 1.0
|
|
|
|
import AppLayouts.Communities.helpers 1.0
|
2023-03-06 12:18:25 +00:00
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
2023-05-17 10:00:52 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2023-03-06 12:18:25 +00:00
|
|
|
SplitView {
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
TokenObject {
|
|
|
|
id: tokenObject
|
|
|
|
|
|
|
|
type: tokenTypeButtonGroup.checkedButton.type
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
artworkSource: artworkButtonGroup.checkedButton.source
|
|
|
|
burnState: burnDestructStateBox.checked
|
|
|
|
? Constants.ContractTransactionStatus.InProgress
|
|
|
|
: Constants.ContractTransactionStatus.Completed
|
2023-03-06 12:18:25 +00:00
|
|
|
name: nameText.text
|
2023-06-22 21:24:30 +00:00
|
|
|
deployState: mintingStateButtonGroup.checkedButton.mintingState
|
2023-03-06 12:18:25 +00:00
|
|
|
symbol: symbolText.text
|
|
|
|
description: descriptionText.text
|
2023-06-01 10:38:56 +00:00
|
|
|
supply: parseInt(supplyText.text)
|
2023-03-06 12:18:25 +00:00
|
|
|
infiniteSupply: unlimitedSupplyChecker.checked
|
2023-05-16 14:50:43 +00:00
|
|
|
remainingTokens: parseInt(remainingText.text)
|
2023-06-22 21:24:30 +00:00
|
|
|
chainId: networksGroup.checkedButton.chainId
|
|
|
|
chainName: networksGroup.checkedButton.text
|
|
|
|
chainIcon: networksGroup.checkedButton.chainIcon
|
2023-03-17 15:09:27 +00:00
|
|
|
accountName: "helloworld"
|
2024-09-19 20:32:38 +00:00
|
|
|
tokenHoldersLoading: loadingTokenHolders.checked
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
// collectible-specific properties
|
|
|
|
remotelyDestructState: remotelyDestructStateBox.checked
|
|
|
|
? Constants.ContractTransactionStatus.InProgress
|
|
|
|
: Constants.ContractTransactionStatus.Completed
|
|
|
|
transferable: transferibleChecker.checked
|
|
|
|
remotelyDestruct: selfdestructChecker.checked
|
2023-06-01 21:23:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
// asset-specific properties
|
2023-06-01 10:38:56 +00:00
|
|
|
decimals: parseInt(decimalText.text)
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
2023-06-01 10:38:56 +00:00
|
|
|
|
|
|
|
CommunityTokenView {
|
|
|
|
id: view
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 50
|
|
|
|
preview: previewBox.checked
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
token: tokenObject
|
2023-06-01 10:38:56 +00:00
|
|
|
tokenOwnersModel: TokenHoldersModel {}
|
2023-09-01 09:27:44 +00:00
|
|
|
feeText: "0.01"
|
|
|
|
feeErrorText: ""
|
|
|
|
isFeeLoading: false
|
2023-07-27 20:29:31 +00:00
|
|
|
|
|
|
|
accounts: WalletAccountsModel {}
|
2023-06-01 10:38:56 +00:00
|
|
|
|
|
|
|
onMintClicked: logs.logEvent("CommunityTokenView::onMintClicked")
|
2023-06-22 21:24:30 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 150
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ScrollView {
|
2023-05-25 10:31:32 +00:00
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
2023-06-22 21:24:30 +00:00
|
|
|
contentHeight: column.implicitHeight
|
|
|
|
contentWidth: width
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-05-17 10:00:52 +00:00
|
|
|
ColumnLayout {
|
2023-06-22 21:24:30 +00:00
|
|
|
id: column
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
width: parent.width
|
2023-05-17 10:00:52 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
2023-05-17 10:00:52 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Token type"
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: tokenTypeButtonGroup
|
|
|
|
|
|
|
|
buttons: tokenTypeColumn.children
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: tokenTypeColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: isAssetRadioButton
|
|
|
|
|
|
|
|
readonly property int type:
|
2023-07-03 14:44:02 +00:00
|
|
|
Constants.TokenType.ERC20
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
text: "Asset"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
RadioButton {
|
|
|
|
readonly property int type:
|
2023-07-03 14:44:02 +00:00
|
|
|
Constants.TokenType.ERC721
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
checked: true
|
|
|
|
text: "Collectible"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-05-17 10:00:52 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
CheckBox {
|
|
|
|
id: previewBox
|
|
|
|
text: "Preview"
|
|
|
|
checked: true
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2024-09-19 20:32:38 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: loadingTokenHolders
|
|
|
|
text: "Loading Token Holders"
|
|
|
|
checked: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Minting state"
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: mintingStateButtonGroup
|
|
|
|
|
|
|
|
buttons: mintingStateColumn.children
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: mintingStateColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.InProgress
|
|
|
|
|
|
|
|
text: "In progress"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.Failed
|
|
|
|
|
|
|
|
text: "Failed"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.Completed
|
|
|
|
|
|
|
|
text: "Completed"
|
|
|
|
checked: true
|
|
|
|
}
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: remotelyDestructStateBox
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
visible: !isAssetRadioButton.checked
|
|
|
|
text: "Remotely destruct in progress"
|
|
|
|
checked: false
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
CheckBox {
|
|
|
|
id: burnDestructStateBox
|
|
|
|
|
|
|
|
text: "Burn in progress"
|
|
|
|
checked: false
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Artwork"
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: artworkButtonGroup
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
buttons: artworkColumn.children
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: artworkColumn
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.icons.superRare
|
|
|
|
|
|
|
|
text: "Small"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.collectibles.kitty2Big
|
|
|
|
|
|
|
|
text: "Medium"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.banners.superRare
|
|
|
|
|
|
|
|
text: "Large"
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
width: parent.width
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
Label {
|
|
|
|
text: "Name"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: nameText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: "Art work"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Description"
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
TextField {
|
|
|
|
id: descriptionText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
2023-07-28 10:51:41 +00:00
|
|
|
text: ModelsData.descriptions.mediumLoremIpsum
|
2023-06-22 21:24:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Symbol"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: symbolText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: "ABC"
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: unlimitedSupplyChecker
|
|
|
|
|
|
|
|
text: "Unlimited supply"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "Supply"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: supplyText
|
|
|
|
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "123"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: remainingText
|
|
|
|
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "123"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
visible: isAssetRadioButton.checked
|
|
|
|
text: "Decimal"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: decimalText
|
|
|
|
|
|
|
|
visible: isAssetRadioButton.checked
|
|
|
|
text: "2"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
visible: !isAssetRadioButton.checked
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: transferibleChecker
|
|
|
|
|
2023-08-17 08:55:28 +00:00
|
|
|
text: "Tranferable"
|
2023-06-22 21:24:30 +00:00
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: selfdestructChecker
|
|
|
|
|
2023-08-17 08:55:28 +00:00
|
|
|
text: "Remote self-destruct"
|
2023-06-22 21:24:30 +00:00
|
|
|
checked: true
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
title: "Network"
|
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: networksGroup
|
|
|
|
|
|
|
|
buttons: networksColumn.children
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: networksColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Ethereum Mainnet"
|
|
|
|
checked: true
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.ethereum
|
|
|
|
readonly property int chainId: 1
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Optimism"
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.optimism
|
|
|
|
readonly property int chainId: 2
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Arbitrum"
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.arbitrum
|
|
|
|
readonly property int chainId: 3
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
Component.onCompleted: spacing *= 2
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Views
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A481005&t=Qo2FwPRxvSxbluqB-1
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A479431&t=Qo2FwPRxvSxbluqB-1
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=2934%3A479570&t=Qo2FwPRxvSxbluqB-1
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?type=design&node-id=29384-568106&t=mAtmLENvQyRJqDGQ-0
|