2023-07-18 09:10:48 +00:00
|
|
|
|
import QtQuick 2.14
|
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
2024-03-13 17:38:16 +00:00
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
|
2023-07-18 09:10:48 +00:00
|
|
|
|
import AppLayouts.Profile.views.wallet 1.0
|
2024-10-24 08:41:28 +00:00
|
|
|
|
import AppLayouts.Profile.stores 1.0 as ProfileStores
|
2023-07-18 09:10:48 +00:00
|
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
|
id: d
|
|
|
|
|
readonly property string emptyString: ""
|
|
|
|
|
|
|
|
|
|
property var dummyOverview: updateDummyView(StatusColors.colors['black'])
|
|
|
|
|
|
|
|
|
|
function updateDummyView(color) {
|
|
|
|
|
const clr = Utils.getIdForColor(color)
|
|
|
|
|
dummyOverview = ({
|
|
|
|
|
name: "helloworld",
|
|
|
|
|
address: "0xcdc2ea3b6ba8fed3a3402f8db8b2fab53e7b7421",
|
|
|
|
|
ens: emptyString,
|
|
|
|
|
colorId: clr,
|
|
|
|
|
emoji: "⚽",
|
|
|
|
|
balanceLoading: false,
|
|
|
|
|
balance: ({amount: 1.25,
|
|
|
|
|
symbol: "USD",
|
|
|
|
|
displayDecimals: 4,
|
|
|
|
|
stripTrailingZeroes: false}),
|
|
|
|
|
isAllAccounts: false,
|
2024-10-02 19:38:03 +00:00
|
|
|
|
path: "m/44’/60’/0’/0’/34"
|
2023-07-18 09:10:48 +00:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
readonly property QtObject connectionStore: QtObject {
|
|
|
|
|
property bool accountBalanceNotAvailable: false
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-24 08:41:28 +00:00
|
|
|
|
readonly property ProfileStores.WalletStore walletStore: ProfileStores.WalletStore {
|
2024-03-13 17:38:16 +00:00
|
|
|
|
property var networks: SortFilterProxyModel {
|
|
|
|
|
sourceModel: NetworksModel.flatNetworks
|
|
|
|
|
filters: ValueFilter { roleName: "isTest"; value: areTestNetworksEnabledCheckbox.checked }
|
|
|
|
|
}
|
2024-06-12 08:52:11 +00:00
|
|
|
|
property var filteredFlatModel: networks
|
2023-07-21 08:41:24 +00:00
|
|
|
|
property bool areTestNetworksEnabled: areTestNetworksEnabledCheckbox.checked
|
2023-07-18 09:10:48 +00:00
|
|
|
|
function toggleNetwork(chainId) {
|
|
|
|
|
}
|
2023-07-21 08:41:24 +00:00
|
|
|
|
}
|
2023-07-18 09:10:48 +00:00
|
|
|
|
|
|
|
|
|
property var keyPairModel: WalletKeyPairModel {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
|
|
AccountView {
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.topMargin: 100
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
width: 560
|
|
|
|
|
account: d.dummyOverview
|
|
|
|
|
walletStore: d.walletStore
|
|
|
|
|
keyPair: d.keyPairModel.data[0].keyPair
|
2023-10-10 15:46:43 +00:00
|
|
|
|
onUpdateWatchAccountHiddenFromTotalBalance: {
|
|
|
|
|
console.warn("updateWatchAccountHiddenFromTotalBalance :: address ::", address, "hideFromTotalBalance :: ", hideFromTotalBalance)
|
|
|
|
|
}
|
2023-07-18 09:10:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-21 08:41:24 +00:00
|
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
|
id: areTestNetworksEnabledCheckbox
|
|
|
|
|
text: "areTestNetworksEnabled"
|
|
|
|
|
checked: false
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-07-18 09:10:48 +00:00
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
|
|
// category: Views
|