status-desktop/storybook/pages/CommunityMintTokensSettingsPanelPage.qml
Noelia d4d3a6d669 feat(MintToken): Add delete and retry mint options when deploy fails
- It refactors `SettingsPageLayout`.
- It adds `retry mint` and `delete` options when deploy process fails.
- It renames `RemotelyDestructAlertPopup` to generic name `AlertPopup`.
2023-06-02 13:15:34 +02:00

86 lines
2.4 KiB
QML

import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import AppLayouts.Chat.panels.communities 1.0
import AppLayouts.Chat.stores 1.0
import StatusQ.Core.Theme 0.1
import Storybook 1.0
import Models 1.0
SplitView {
orientation: Qt.Vertical
SplitView.fillWidth: true
Logs { id: logs }
ListModel {
id: emptyModel
}
Rectangle {
SplitView.fillWidth: true
SplitView.fillHeight: true
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
CommunityMintTokensSettingsPanel {
anchors.fill: parent
anchors.topMargin: 50
tokensModel: editorModelChecked.checked ? emptyModel : MintedTokensModel.mintedTokensModel
layer1Networks: NetworksModel.layer1Networks
layer2Networks: NetworksModel.layer2Networks
testNetworks: NetworksModel.testNetworks
enabledNetworks: NetworksModel.enabledNetworks
allNetworks: enabledNetworks
accounts: WalletAccountsModel {}
onMintCollectible: logs.logEvent("CommunityMintTokensSettingsPanel::mintCollectible")
onMintAsset: logs.logEvent("CommunityMintTokensSettingsPanel::mintAssets")
onDeleteToken: logs.logEvent("CommunityMintTokensSettingsPanel::deleteToken: " + key)
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 150
logsView.logText: logs.logText
RowLayout {
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Is empty model?"
}
CheckBox {
id: editorModelChecked
checked: true
}
}
ColumnLayout {
Label {
Layout.fillWidth: true
text: "Is minting in progress?"
}
CheckBox {
id: editorMintingChecked
checked: true
onCheckedChanged:{
if(checked)
MintedTokensModel.changeAllMintingStates(1/*In progress*/)
else
MintedTokensModel.changeAllMintingStates(2/*Deployed*/)
}
}
}
}
}
}