2023-03-06 12:18:25 +00:00
import QtQuick 2.14
import QtQuick . Controls 2.14
import QtQuick . Layouts 1.14
import AppLayouts . Chat . views . communities 1.0
2023-05-25 10:31:32 +00:00
import StatusQ . Core 0.1
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-05-25 09:11:27 +00:00
CommunityTokenView {
2023-03-06 12:18:25 +00:00
id: view
anchors.fill: parent
anchors.margins: 50
artworkSource: ModelsData . icons . superRare
preview: previewBox . checked
2023-05-25 10:31:32 +00:00
isAssetView: isAssetBox . checked
2023-05-16 14:50:43 +00:00
remotelyDestructState: remotelyDestructStateBox . checked ? 1 /*In progress*/ : 2 /*Completed*/
burnState: burnDestructStateBox . checked ? 1 /*In progress*/ : 2 /*Completed*/
2023-03-06 12:18:25 +00:00
name: nameText . text
symbol: symbolText . text
description: descriptionText . text
2023-03-28 07:47:12 +00:00
supplyAmount: parseInt ( supplyText . text )
2023-03-06 12:18:25 +00:00
infiniteSupply: unlimitedSupplyChecker . checked
2023-05-25 10:31:32 +00:00
assetDecimals: parseInt ( decimalText . text )
2023-05-16 14:50:43 +00:00
remainingTokens: parseInt ( remainingText . text )
2023-03-06 12:18:25 +00:00
transferable: transferibleChecker . checked
selfDestruct: selfdestructChecker . checked
chainId: 1
chainName: "Ethereum Mainnet"
chainIcon: ModelsData . networks . ethereum
2023-03-17 15:09:27 +00:00
accountName: "helloworld"
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
onMintCollectible: logs . logEvent ( "CommunityTokenView::onMintCollectible: \n"
2023-03-06 12:18:25 +00:00
+ "artworkSource: " + artworkSource + "\n"
+ "name: " + name + "\n"
+ "symbol: " + symbol + "\n"
+ "description: " + description + "\n"
+ "supply: " + supply + "\n"
+ "infiniteSupply: " + infiniteSupply + "\n"
+ "transferable: " + transferable + "\n"
+ "selfDestruct: " + selfDestruct + "\n"
2023-05-25 10:31:32 +00:00
+ "chainId: " + chainId + "\n"
+ "accountName: " + accountName )
onMintAsset: logs . logEvent ( "CommunityTokenView::onMintAsset: \n"
+ "artworkSource: " + artworkSource + "\n"
+ "name: " + name + "\n"
+ "symbol: " + symbol + "\n"
+ "description: " + description + "\n"
+ "supply: " + supply + "\n"
+ "infiniteSupply: " + infiniteSupply + "\n"
+ "decimals: " + decimals + "\n"
+ "chainId: " + chainId + "\n"
+ "accountName: " + accountName )
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-05-25 10:31:32 +00:00
StatusScrollView {
width: parent . width
height: parent . height
contentHeight: _column . implicitHeight
contentWidth: _column . implicitWidth
2023-03-06 12:18:25 +00:00
2023-05-17 10:00:52 +00:00
ColumnLayout {
2023-05-25 10:31:32 +00:00
id: _column
CheckBox {
id: previewBox
text: "Is preview view?"
checked: true
2023-05-17 10:00:52 +00:00
}
2023-05-25 10:31:32 +00:00
CheckBox {
id: isAssetBox
text: "Is Assets View?"
checked: false
2023-05-17 10:00:52 +00:00
}
2023-05-25 10:31:32 +00:00
ColumnLayout {
Label {
text: "Minting state:"
}
RadioButton {
id: mintingInProgress
text: "In progress"
onCheckedChanged: if ( checked ) view . deployState = Constants . BackendProcessState . InProgress
}
RadioButton {
id: mintingFailed
text: "Failed"
onCheckedChanged: if ( checked ) view . deployState = Constants . BackendProcessState . Failed
}
RadioButton {
id: mintingCompleted
text: "Completed"
checked: true
onCheckedChanged: if ( checked ) view . deployState = Constants . BackendProcessState . Completed
}
2023-05-17 10:00:52 +00:00
}
2023-05-25 10:31:32 +00:00
CheckBox {
id: remotelyDestructStateBox
visible: ! isAssetBox . checked
text: "Remotely destruct in progress"
checked: false
2023-05-17 10:00:52 +00:00
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
CheckBox {
id: burnDestructStateBox
text: "Burn in progress"
checked: false
}
2023-05-16 14:50:43 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
text: "Artwork"
}
2023-05-16 14:50:43 +00:00
2023-05-25 10:31:32 +00:00
RadioButton {
text: "Small"
checked: true
onCheckedChanged: view . artworkSource = ModelsData . icons . superRare
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
RadioButton {
text: "Medium"
onCheckedChanged: view . artworkSource = ModelsData . collectibles . kitty2Big
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
RadioButton {
text: "Large"
onCheckedChanged: view . artworkSource = ModelsData . banners . superRare
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
text: "Name"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: nameText
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Art work"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
text: "Description"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: descriptionText
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "Long art work description Long art work description Long art work description Long art work description Long art work description Long art work description Long art work description Long art work description Long art work description"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
text: "Symbol"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: symbolText
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "ABC"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
CheckBox {
id: unlimitedSupplyChecker
Layout.topMargin: 10
text: "Unlimited supply"
checked: true
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
visible: ! unlimitedSupplyChecker . checked
Layout.fillWidth: true
text: "Supply"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: supplyText
visible: ! unlimitedSupplyChecker . checked
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "123"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: remainingText
visible: ! unlimitedSupplyChecker . checked
background: Rectangle { border.color: 'lightgrey' }
Layout.preferredWidth: 200
text: "123"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
visible: isAssetBox . checked
text: "Decimal"
}
2023-05-16 14:50:43 +00:00
2023-05-25 10:31:32 +00:00
TextField {
id: decimalText
Layout.preferredWidth: 200
background: Rectangle { border.color: 'lightgrey' }
visible: isAssetBox . checked
text: "2"
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
CheckBox {
id: transferibleChecker
Layout.topMargin: 10
visible: ! isAssetBox . checked
text: "Tranferible"
checked: true
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
CheckBox {
id: selfdestructChecker
visible: ! isAssetBox . checked
text: "Remote self-desctruct"
checked: true
}
2023-03-06 12:18:25 +00:00
2023-05-25 10:31:32 +00:00
Label {
Layout.topMargin: 10
Layout.fillWidth: true
text: "Network"
2023-03-06 12:18:25 +00:00
}
2023-05-25 10:31:32 +00:00
RadioButton {
id: eth
text: "Ethereum Mainnet"
checked: true
onCheckedChanged: {
view . chainName = text
view . chainIcon = ModelsData . networks . ethereum
view . chainId = 1
}
2023-03-06 12:18:25 +00:00
}
2023-05-25 10:31:32 +00:00
RadioButton {
id: opt
text: "Optimism"
onCheckedChanged: {
view . chainName = text
view . chainIcon = ModelsData . networks . optimism
view . chainId = 2
}
}
RadioButton {
id: arb
text: "Arbitrum"
onCheckedChanged: {
view . chainName = text
view . chainIcon = ModelsData . networks . arbitrum
view . chainId = 3
}
2023-03-06 12:18:25 +00:00
}
}
}
}
}