2023-03-28 11:07:39 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.controls 1.0
|
2023-03-28 11:07:39 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
readonly property var items: [
|
|
|
|
{
|
|
|
|
tokenText: "2 MCT",
|
|
|
|
networkText: "Ethereum",
|
2024-10-15 19:26:12 +00:00
|
|
|
tokenImage: Theme.png("tokens/SNT"),
|
|
|
|
networkImage: Theme.svg("network/Network=Ethereum"),
|
2023-04-27 22:13:59 +00:00
|
|
|
valid: true
|
2023-03-28 11:07:39 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
tokenText: "64 DAI",
|
|
|
|
networkText: "Optimism",
|
2024-10-15 19:26:12 +00:00
|
|
|
tokenImage: Theme.png("tokens/DAI"),
|
|
|
|
networkImage: Theme.svg("network/Network=Optimism"),
|
2023-04-27 22:13:59 +00:00
|
|
|
valid: false
|
2023-03-28 11:07:39 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
tokenText: "0.125 ETH",
|
|
|
|
networkText: "Arbitrum",
|
2024-10-15 19:26:12 +00:00
|
|
|
tokenImage: Theme.png("tokens/ETH"),
|
|
|
|
networkImage: Theme.svg("network/Network=Arbitrum"),
|
2023-04-27 22:13:59 +00:00
|
|
|
valid: true
|
2023-03-28 11:07:39 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
AirdropTokensSelector {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
placeholderText: "Example: Empty items"
|
|
|
|
|
|
|
|
property int counter: 0
|
|
|
|
|
|
|
|
model: ListModel {
|
2023-04-25 20:27:33 +00:00
|
|
|
id: listModel
|
2023-03-28 11:07:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
addButton.onClicked: model.append(items[(counter++) % items.length])
|
|
|
|
onItemClicked: model.remove(index)
|
|
|
|
|
|
|
|
Component.onCompleted: model.append(items[counter++])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
Layout.bottomMargin: 10
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "Clear list"
|
|
|
|
onClicked: listModel.clear()
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Components
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=22602-495563
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=22628-494998
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=22647-501909
|