status-desktop/storybook/pages/SortableTokenHoldersPanelPage.qml
Noelia d832a306a4 fix(Minting): After minting completed 1 airdrop button is enabled and the other disabled
- Added `buttonEnabled` property to `StatusInfoBoxPanel` so it can be set from outside.
- Fixed airdrop button enable condition in minting flow. It is enabled when minting state is completed and if the token properties are infinite supply or there are still remaining tokens to be airdropped.
- Updated storybook accordingly.

Fixes #11496
2023-08-01 13:20:31 +02:00

94 lines
2.2 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import AppLayouts.Communities.panels 1.0
import Storybook 1.0
import Models 1.0
SplitView {
id: root
Logs { id: logs }
orientation: Qt.Vertical
Item {
SplitView.fillWidth: true
SplitView.fillHeight: true
Rectangle {
anchors.fill: holdersPanel
color: "transparent"
border.color: "lightgray"
anchors.margins: -1
}
SortableTokenHoldersPanel {
id: holdersPanel
anchors.centerIn: parent
width: 568
tokenName: "Aniversary"
TokenHoldersModel {
id: tokenHoldersModel
}
ListModel {
id: emptyModel
}
model: emptyCheckBox.checked ? emptyModel : tokenHoldersModel
showRemotelyDestructMenuItem: remotelyDestructCheckBox.checked
isAirdropEnabled: airdropCheckBox.checked
onViewProfileRequested:
logs.logEvent("onViewProfileRequested: " + address)
onViewMessagesRequested:
logs.logEvent("onViewMessagesRequested: " + address)
onAirdropRequested:
logs.logEvent("onAirdropRequested: " + address)
onRemoteDestructRequested:
logs.logEvent("onRemoteDestructRequested: " + address)
onKickRequested:
logs.logEvent("onKickRequested: " + address)
onBanRequested:
logs.logEvent("onBanRequested: " + address)
}
}
LogsAndControlsPanel {
id: logsAndControlsPanel
SplitView.minimumHeight: 100
SplitView.preferredHeight: 200
logsView.logText: logs.logText
ColumnLayout {
CheckBox {
id: emptyCheckBox
text: "Empty"
}
CheckBox {
id: remotelyDestructCheckBox
checked: true
text: "Show \"Remotely Destruct\" menu item"
}
CheckBox {
id: airdropCheckBox
text: "Airdrop enabled"
checked: true
}
}
}
}
// category: Panels