2023-02-17 11:57:41 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
2023-03-29 10:53:29 +00:00
|
|
|
import QtQuick.Layouts 1.14
|
2023-02-17 11:57:41 +00:00
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.panels 1.0
|
2023-02-17 11:57:41 +00:00
|
|
|
import AppLayouts.Chat.stores 1.0
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
2023-02-17 11:57:41 +00:00
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
2023-03-29 10:53:29 +00:00
|
|
|
ListModel {
|
|
|
|
id: emptyModel
|
|
|
|
}
|
|
|
|
|
2023-05-31 08:23:05 +00:00
|
|
|
Button {
|
|
|
|
text: "Back"
|
|
|
|
onClicked: panel.navigateBack()
|
|
|
|
}
|
2023-06-28 19:30:01 +00:00
|
|
|
|
|
|
|
Timer {
|
|
|
|
id: feesTimer
|
|
|
|
|
|
|
|
interval: 1000
|
|
|
|
|
|
|
|
onTriggered: {
|
|
|
|
panel.isFeeLoading = false
|
|
|
|
panel.feeText = "0,0002 ETH (123,15 USD)"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-17 11:57:41 +00:00
|
|
|
Rectangle {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
2023-05-31 08:23:05 +00:00
|
|
|
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
|
2023-02-17 11:57:41 +00:00
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
MintTokensSettingsPanel {
|
2023-05-31 08:23:05 +00:00
|
|
|
id: panel
|
|
|
|
|
2023-06-27 21:05:33 +00:00
|
|
|
MintedTokensModel {
|
|
|
|
id: mintedTokensModel
|
|
|
|
}
|
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
SortFilterProxyModel {
|
|
|
|
id: privilegedTokensModel
|
|
|
|
|
|
|
|
sourceModel: mintedTokensModel
|
|
|
|
|
|
|
|
filters: ValueFilter {
|
|
|
|
roleName: "isPrivilegedToken"
|
|
|
|
value: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-17 11:57:41 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin: 50
|
2023-07-18 17:34:57 +00:00
|
|
|
|
|
|
|
// General:
|
2023-07-10 14:12:25 +00:00
|
|
|
communityLogo: ModelsData.collectibles.doodles
|
|
|
|
communityColor: "#FFC4E9"
|
2023-07-18 17:34:57 +00:00
|
|
|
communityName: "Doodles" // It cannot be changed since owner token and tMaster token in tokenModel used are related to the `Doodles` community
|
|
|
|
|
|
|
|
// Profile type:
|
|
|
|
isAdmin: adminChecked.checked
|
|
|
|
isOwner: ownerChecked.checked
|
2023-07-10 14:12:25 +00:00
|
|
|
isTokenMasterOwner: masterTokenOwnerChecked.checked
|
2023-07-18 17:34:57 +00:00
|
|
|
|
|
|
|
// Owner and TMaster related props:
|
|
|
|
isOwnerTokenDeployed: deployCheck.checked
|
|
|
|
isTMasterTokenDeployed: deployCheck.checked
|
|
|
|
|
|
|
|
// Models:
|
|
|
|
tokensModel: editorModelChecked.checked ? emptyModel :
|
|
|
|
privilegedModelChecked.checked ? privilegedTokensModel : mintedTokensModel
|
2023-03-08 13:44:47 +00:00
|
|
|
layer1Networks: NetworksModel.layer1Networks
|
|
|
|
layer2Networks: NetworksModel.layer2Networks
|
|
|
|
testNetworks: NetworksModel.testNetworks
|
|
|
|
enabledNetworks: NetworksModel.enabledNetworks
|
2023-03-29 10:53:29 +00:00
|
|
|
allNetworks: enabledNetworks
|
2023-03-17 15:09:27 +00:00
|
|
|
accounts: WalletAccountsModel {}
|
2023-07-04 13:21:15 +00:00
|
|
|
tokensModelWallet: ListModel {
|
|
|
|
ListElement {
|
|
|
|
symbol: "MAI"
|
|
|
|
}
|
|
|
|
}
|
2023-07-18 17:34:57 +00:00
|
|
|
|
2023-03-13 10:52:00 +00:00
|
|
|
onMintCollectible: logs.logEvent("CommunityMintTokensSettingsPanel::mintCollectible")
|
2023-05-30 15:18:45 +00:00
|
|
|
onMintAsset: logs.logEvent("CommunityMintTokensSettingsPanel::mintAssets")
|
2023-06-29 16:02:27 +00:00
|
|
|
onDeleteToken: logs.logEvent("CommunityMintTokensSettingsPanel::deleteToken: " + tokenKey)
|
2023-06-28 19:30:01 +00:00
|
|
|
onSignMintTransactionOpened: feesTimer.restart()
|
2023-03-29 10:53:29 +00:00
|
|
|
}
|
2023-02-17 11:57:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
2023-07-18 17:34:57 +00:00
|
|
|
SplitView.preferredHeight: 300
|
2023-02-17 11:57:41 +00:00
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
2023-03-29 10:53:29 +00:00
|
|
|
|
2023-06-28 19:30:01 +00:00
|
|
|
ColumnLayout {
|
2023-07-06 12:33:27 +00:00
|
|
|
CheckBox {
|
|
|
|
id: ownerChecked
|
|
|
|
checked: true
|
|
|
|
|
2023-07-12 14:06:07 +00:00
|
|
|
text: "Is Owner? [Owner will be able to create an OWNER and TOKEN MASTER token]"
|
2023-07-06 12:33:27 +00:00
|
|
|
}
|
|
|
|
|
2023-07-10 14:12:25 +00:00
|
|
|
CheckBox {
|
|
|
|
id: masterTokenOwnerChecked
|
|
|
|
checked: true
|
|
|
|
|
2023-07-12 14:06:07 +00:00
|
|
|
text: "Is TMaster token owner? [TMaster token owner will be able to mint / airdrop tokens once the TMaster is already created]"
|
2023-07-10 14:12:25 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 12:33:27 +00:00
|
|
|
CheckBox {
|
|
|
|
id: adminChecked
|
|
|
|
checked: true
|
|
|
|
|
2023-07-12 14:06:07 +00:00
|
|
|
text: "Is admin? [Admis will be able to see token views, but NOT manage them, like creating new artwork or asset]"
|
2023-07-06 12:33:27 +00:00
|
|
|
}
|
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
RowLayout {
|
|
|
|
RadioButton {
|
|
|
|
id: editorModelChecked
|
|
|
|
|
|
|
|
checked: true
|
2023-03-29 10:53:29 +00:00
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
text: "No tokens minted yet"
|
|
|
|
}
|
|
|
|
RadioButton {
|
|
|
|
id: privilegedModelChecked
|
|
|
|
|
|
|
|
text: "Owner token and TMaster token only"
|
|
|
|
}
|
|
|
|
RadioButton {
|
|
|
|
id: completeModelChecked
|
|
|
|
|
|
|
|
text: "Minted tokens list"
|
|
|
|
}
|
2023-03-29 10:53:29 +00:00
|
|
|
}
|
2023-06-28 19:30:01 +00:00
|
|
|
|
|
|
|
RowLayout {
|
2023-07-18 17:34:57 +00:00
|
|
|
|
|
|
|
RadioButton {
|
2023-06-28 19:30:01 +00:00
|
|
|
text: "Set all to 'In progress'"
|
|
|
|
|
|
|
|
onClicked: mintedTokensModel.changeAllMintingStates(1)
|
2023-03-29 10:53:29 +00:00
|
|
|
}
|
|
|
|
|
2023-07-18 17:34:57 +00:00
|
|
|
RadioButton {
|
2023-06-28 19:30:01 +00:00
|
|
|
text: "Set all to 'Error'"
|
2023-03-29 10:53:29 +00:00
|
|
|
|
2023-06-28 19:30:01 +00:00
|
|
|
onClicked: mintedTokensModel.changeAllMintingStates(0)
|
2023-03-29 10:53:29 +00:00
|
|
|
}
|
2023-07-18 17:34:57 +00:00
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: deployCheck
|
|
|
|
|
|
|
|
text: "Set all to 'Deployed'"
|
|
|
|
|
|
|
|
onClicked: mintedTokensModel.changeAllMintingStates(2)
|
|
|
|
}
|
2023-03-29 10:53:29 +00:00
|
|
|
}
|
|
|
|
}
|
2023-02-17 11:57:41 +00:00
|
|
|
}
|
|
|
|
}
|