mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 22:36:24 +00:00
59f604349c
refactor: wallet: connect current account refactor(@wallet): load collection and connect to store refactor(@wallet): add boilerplate for accounts creation/generation refactor(@wallet): watch account refactor(@wallet): Add account generation refactor(@wallet): display all accounts refactor(@wallet): switch account refactor(@desktop): update current currency refactor(@desktop/wallet): token action refactor(@desktop/wallet): Add update account refactor(@desktop/wallet): filter chat account from wallet refactor(@desktop/wallet): Update currency attribute refactor(@desktop/wallet): Fix display of various balances refactor(@dekstop/wallet): handle current account changed refactor(@wallet/desktop): add notify event on main section refactor(@desktop/wallet): Push events from service refactor(@desktop/wallet): handle all tokens event refactor(@desktop/wallet): refresh accounts on event refactor(@wallet/desktop): formatting of currency balances refactor(@desktop/wallet): load collectible refactor: refactor wallet transaction history to the new architecture update status-lib refactor: add back events for the transaction history refactor: support multiple accounts in the transaction history
88 lines
2.6 KiB
QML
88 lines
2.6 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
|
|
import utils 1.0
|
|
|
|
import shared 1.0
|
|
import shared.panels 1.0
|
|
|
|
import StatusQ.Controls 0.1 as StatusQControls
|
|
|
|
Item {
|
|
id: modalBody
|
|
|
|
property string currency: "USD"
|
|
property alias tokenListModel: tokenListView.model
|
|
|
|
anchors.fill: parent
|
|
|
|
ButtonGroup {
|
|
id: currencyGroup
|
|
}
|
|
|
|
ListView {
|
|
id: tokenListView
|
|
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.bottom: parent.bottom
|
|
|
|
clip: true
|
|
spacing: 10
|
|
ScrollBar.vertical: ScrollBar {
|
|
active: true
|
|
policy: tokenListView.contentHeight > tokenListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
}
|
|
boundsBehavior: Flickable.StopAtBounds
|
|
|
|
delegate: Component {
|
|
Rectangle {
|
|
id: wrapper
|
|
property bool hovered: false
|
|
radius: Style.current.radius
|
|
color: modalBody.currency === key ? Style.current.secondaryBackground : (hovered ? Style.current.backgroundHover: Style.current.transparent)
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 0
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 10
|
|
width: parent.width
|
|
height: 52
|
|
|
|
StyledText {
|
|
text: name + " (" + code + ")"
|
|
font.pixelSize: 15
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: Style.current.padding
|
|
}
|
|
|
|
StatusQControls.StatusRadioButton {
|
|
id: currencyRadioBtn
|
|
checked: currency === key
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: Style.current.padding
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
ButtonGroup.group: currencyGroup
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
cursorShape: Qt.PointingHandCursor
|
|
hoverEnabled: true
|
|
onEntered: {
|
|
wrapper.hovered = true
|
|
}
|
|
onExited: {
|
|
wrapper.hovered = false
|
|
}
|
|
onClicked: {
|
|
currencyRadioBtn.checked = !currencyRadioBtn.checked
|
|
modalBody.currency = key
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|