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
|
|
|
|
2023-03-15 09:17:25 +00:00
|
|
|
property var networkConnectionStore
|
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-09-13 16:17:54 +00:00
|
|
|
implicitHeight: 88
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
GridLayout {
|
|
|
|
width: parent.width
|
|
|
|
columns: 2
|
2020-05-28 13:49:28 +00:00
|
|
|
|
2022-07-19 13:17:35 +00:00
|
|
|
// account + balance
|
2022-09-13 16:17:54 +00:00
|
|
|
RowLayout {
|
|
|
|
Layout.preferredHeight: 56
|
2022-07-19 13:17:35 +00:00
|
|
|
spacing: Style.current.halfPadding
|
|
|
|
StatusBaseText {
|
2022-07-18 08:37:37 +00:00
|
|
|
objectName: "accountName"
|
2022-09-13 16:17:54 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2022-07-19 13:17:35 +00:00
|
|
|
font.pixelSize: 28
|
|
|
|
font.bold: true
|
|
|
|
text: currentAccount.name
|
|
|
|
}
|
2023-01-10 13:04:23 +00:00
|
|
|
StatusTextWithLoadingState {
|
2022-09-13 16:17:54 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2022-07-19 13:17:35 +00:00
|
|
|
font.pixelSize: 28
|
|
|
|
font.bold: true
|
2023-01-10 13:04:23 +00:00
|
|
|
customColor: Theme.palette.baseColor1
|
2023-03-22 22:08:36 +00:00
|
|
|
text: loading ? Constants.dummyText : LocaleUtils.currencyAmountToLocaleString(root.currentAccount.currencyBalance)
|
|
|
|
loading: root.currentAccount.assetsLoading
|
2023-03-23 10:23:02 +00:00
|
|
|
visible: !networkConnectionStore.accountBalanceNotAvailable
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|
|
|
|
}
|
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.rowSpan: 2
|
2023-03-08 13:44:47 +00:00
|
|
|
layer1Networks: walletStore.layer1Networks
|
|
|
|
layer2Networks: walletStore.layer2Networks
|
|
|
|
testNetworks: walletStore.testNetworks
|
|
|
|
enabledNetworks: walletStore.enabledNetworks
|
|
|
|
allNetworks: walletStore.allNetworks
|
|
|
|
|
|
|
|
onToggleNetwork: walletStore.toggleNetwork(chainId)
|
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-12-12 12:07:51 +00:00
|
|
|
value: currentAccount.ens || currentAccount.mixedcaseAddress
|
|
|
|
ens: !!currentAccount.ens
|
2022-08-03 12:51:47 +00:00
|
|
|
autHideCopyIcon: true
|
|
|
|
expanded: false
|
|
|
|
|
2022-12-12 12:07:51 +00:00
|
|
|
onDoCopy: () => root.store.copyToClipboard(currentAccount.mixedcaseAddress)
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|
2022-02-15 13:19:45 +00:00
|
|
|
}
|
2022-07-19 13:17:35 +00:00
|
|
|
}
|