2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
2022-08-03 12:51:47 +00:00
|
|
|
import StatusQ.Components 0.1
|
2022-07-19 13:17:35 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
2021-10-05 20:50:22 +00:00
|
|
|
import "../controls"
|
2021-11-11 17:25:54 +00:00
|
|
|
import "../stores"
|
2020-05-28 13:49:28 +00:00
|
|
|
|
|
|
|
Item {
|
2022-07-19 13:17:35 +00:00
|
|
|
id: root
|
2021-10-05 20:50:22 +00:00
|
|
|
|
2021-12-06 21:10:54 +00:00
|
|
|
property string locale: ""
|
2021-10-21 08:22:05 +00:00
|
|
|
property string currency: ""
|
2021-10-05 20:50:22 +00:00
|
|
|
property var currentAccount
|
2022-01-31 13:29:27 +00:00
|
|
|
property var store
|
2022-02-15 13:19:45 +00:00
|
|
|
property var walletStore
|
2020-06-03 19:59:18 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
implicitHeight: childrenRect.height
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
GridLayout {
|
|
|
|
width: parent.width
|
|
|
|
rowSpacing: Style.current.halfPadding
|
|
|
|
columns: 2
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
// account + balance
|
|
|
|
Row {
|
|
|
|
spacing: Style.current.halfPadding
|
|
|
|
StatusBaseText {
|
2022-07-18 08:37:37 +00:00
|
|
|
objectName: "accountName"
|
2022-07-19 13:17:35 +00:00
|
|
|
font.pixelSize: 28
|
|
|
|
font.bold: true
|
|
|
|
text: currentAccount.name
|
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
font.pixelSize: 28
|
|
|
|
font.bold: true
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
text: "%1 %2".arg(Utils.toLocaleString(root.currentAccount.currencyBalance.toFixed(2), root.locale, {"currency": true})).arg(root.currency.toUpperCase())
|
|
|
|
}
|
|
|
|
}
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
// network filter
|
|
|
|
NetworkFilter {
|
|
|
|
id: networkFilter
|
|
|
|
Layout.alignment: Qt.AlignTrailing
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.rowSpan: 2
|
|
|
|
store: root.walletStore
|
2021-10-21 08:22:05 +00:00
|
|
|
}
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-08-03 12:51:47 +00:00
|
|
|
StatusAddressPanel {
|
2022-08-18 17:51:18 +00:00
|
|
|
objectName: "addressPanel"
|
2022-08-03 12:51:47 +00:00
|
|
|
address: currentAccount.mixedcaseAddress
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-08-03 12:51:47 +00:00
|
|
|
autHideCopyIcon: true
|
|
|
|
expanded: false
|
|
|
|
|
|
|
|
onDoCopy: (address) => root.store.copyToClipboard(address)
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|
2022-02-15 13:19:45 +00:00
|
|
|
}
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|