2023-03-28 11:07:39 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
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",
|
|
|
|
tokenImage: Style.png("tokens/SNT"),
|
2023-04-27 22:13:59 +00:00
|
|
|
networkImage: Style.svg("network/Network=Ethereum"),
|
|
|
|
valid: true
|
2023-03-28 11:07:39 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
tokenText: "64 DAI",
|
|
|
|
networkText: "Optimism",
|
|
|
|
tokenImage: Style.png("tokens/DAI"),
|
2023-04-27 22:13:59 +00:00
|
|
|
networkImage: Style.svg("network/Network=Optimism"),
|
|
|
|
valid: false
|
2023-03-28 11:07:39 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
tokenText: "0.125 ETH",
|
|
|
|
networkText: "Arbitrum",
|
|
|
|
tokenImage: Style.png("tokens/ETH"),
|
2023-04-27 22:13:59 +00:00
|
|
|
networkImage: Style.svg("network/Network=Arbitrum"),
|
|
|
|
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
|