2024-06-12 20:43:08 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
import AppLayouts.Wallet.views 1.0
|
|
|
|
|
2024-06-25 13:37:42 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2024-06-12 20:43:08 +00:00
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: Theme.palette.baseColor3
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: 380
|
|
|
|
height: 200
|
|
|
|
color: Theme.palette.statusListItem.backgroundColor
|
|
|
|
border.color: Theme.palette.primaryColor1
|
|
|
|
border.width: 1
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
TokenSelectorAssetDelegate {
|
2024-09-18 11:03:36 +00:00
|
|
|
width: 333
|
2024-06-12 20:43:08 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
name: "Ethereum"
|
|
|
|
symbol: "ETH"
|
|
|
|
currencyBalanceAsString: "14,456.42 USD"
|
2024-06-25 13:37:42 +00:00
|
|
|
iconSource: Constants.tokenIcon(symbol)
|
2024-11-08 11:22:13 +00:00
|
|
|
isFirstSearchEntry: ctrlIsFirstSearchEntry.checked
|
2024-09-18 11:03:36 +00:00
|
|
|
|
2024-06-12 20:43:08 +00:00
|
|
|
balancesModel: ListModel {
|
|
|
|
readonly property var data: [
|
|
|
|
{ chainId: 1, balanceAsString: "1234.50", iconUrl: "network/Network=Ethereum" },
|
|
|
|
{ chainId: 42161, balanceAsString: "55.91", iconUrl: "network/Network=Arbitrum" },
|
|
|
|
{ chainId: 10, balanceAsString: "45.12", iconUrl: "network/Network=Optimism" },
|
2024-10-16 20:28:32 +00:00
|
|
|
{ chainId: 11155420, balanceAsString: "1.23", iconUrl: "network/Network=Testnet" }
|
2024-06-12 20:43:08 +00:00
|
|
|
]
|
|
|
|
Component.onCompleted: append(data)
|
|
|
|
}
|
|
|
|
|
2024-09-18 11:03:36 +00:00
|
|
|
enabled: ctrlEnabled.checked
|
2024-06-12 20:43:08 +00:00
|
|
|
highlighted: ctrlHighlighted.checked
|
|
|
|
|
2024-09-18 11:03:36 +00:00
|
|
|
onClicked: key => logs.logEvent("TokenSelectorAssetDelegate::onClicked")
|
2024-06-12 20:43:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
SplitView.minimumHeight: 300
|
|
|
|
SplitView.preferredHeight: 300
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Switch {
|
2024-09-18 11:03:36 +00:00
|
|
|
id: ctrlEnabled
|
|
|
|
text: "Enabled"
|
2024-06-12 20:43:08 +00:00
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
Switch {
|
|
|
|
id: ctrlHighlighted
|
|
|
|
text: "Highlighted"
|
|
|
|
checked: false
|
|
|
|
}
|
2024-11-08 11:22:13 +00:00
|
|
|
Switch {
|
|
|
|
id: ctrlIsFirstSearchEntry
|
|
|
|
text: "isFirstSearchEntry"
|
|
|
|
checked: false
|
|
|
|
}
|
2024-06-12 20:43:08 +00:00
|
|
|
|
|
|
|
Item { Layout.fillHeight: true }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Delegates
|