2023-10-17 19:09:45 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2024-01-16 16:22:05 +00:00
|
|
|
import StatusQ.Models 0.1
|
2023-10-17 19:09:45 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
2024-01-24 16:35:53 +00:00
|
|
|
import AppLayouts.Wallet.panels 1.0
|
|
|
|
import AppLayouts.Wallet.stores 1.0
|
|
|
|
|
2023-10-17 19:09:45 +00:00
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Horizontal
|
|
|
|
|
2024-01-24 16:35:53 +00:00
|
|
|
readonly property WalletAssetsStore walletAssetStore: WalletAssetsStore {
|
|
|
|
assetsWithFilteredBalances: groupedAccountsAssetsModel
|
2023-10-17 19:09:45 +00:00
|
|
|
}
|
|
|
|
|
2024-01-26 15:39:42 +00:00
|
|
|
ManageAssetsPanel {
|
|
|
|
id: showcasePanel
|
|
|
|
|
2023-10-17 19:09:45 +00:00
|
|
|
SplitView.fillWidth: true
|
2023-11-17 14:08:43 +00:00
|
|
|
SplitView.fillHeight: true
|
2024-01-26 15:39:42 +00:00
|
|
|
|
|
|
|
getCurrencyAmount: function (balance, symbol) {
|
|
|
|
return ({
|
|
|
|
amount: balance,
|
|
|
|
symbol: symbol,
|
|
|
|
displayDecimals: 2,
|
|
|
|
stripTrailingZeroes: false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
getCurrentCurrencyAmount: function (balance) {
|
|
|
|
return ({
|
|
|
|
amount: balance,
|
|
|
|
symbol: "USD",
|
|
|
|
displayDecimals: 2,
|
|
|
|
stripTrailingZeroes: false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
controller: ManageTokensController {
|
|
|
|
sourceModel: ctrlEmptyModel.checked ? null : walletAssetStore.groupedAccountAssetsModel
|
|
|
|
settingsKey: "WalletAssets"
|
2023-10-17 19:09:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumWidth: 150
|
|
|
|
SplitView.preferredWidth: 250
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
2024-01-31 18:09:44 +00:00
|
|
|
text: "Dirty: %1 (rev %2)".arg(showcasePanel.dirty ? "true" : "false").arg(showcasePanel.controller.revision)
|
2023-10-17 19:09:45 +00:00
|
|
|
}
|
|
|
|
|
2023-12-06 10:54:36 +00:00
|
|
|
Label {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
text: "Has saved settings: %1".arg(showcasePanel.hasSettings ? "true" : "false")
|
|
|
|
}
|
|
|
|
|
2023-10-17 19:09:45 +00:00
|
|
|
Button {
|
2024-01-19 09:53:32 +00:00
|
|
|
enabled: showcasePanel.dirty
|
2023-10-17 19:09:45 +00:00
|
|
|
text: "Save"
|
|
|
|
onClicked: showcasePanel.saveSettings()
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "Revert"
|
|
|
|
onClicked: showcasePanel.revert()
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
2023-12-06 10:54:36 +00:00
|
|
|
enabled: showcasePanel.hasSettings
|
2023-10-17 19:09:45 +00:00
|
|
|
text: "Clear settings"
|
|
|
|
onClicked: showcasePanel.clearSettings()
|
|
|
|
}
|
|
|
|
|
|
|
|
Switch {
|
|
|
|
id: ctrlEmptyModel
|
|
|
|
text: "Empty model"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Panels
|
|
|
|
|
|
|
|
// https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?type=design&node-id=18139-95033&mode=design&t=nqFScWLfusXBNQA5-0
|
|
|
|
// https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?type=design&node-id=17674-273051&mode=design&t=nqFScWLfusXBNQA5-0
|
|
|
|
// https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?type=design&node-id=17636-249780&mode=design&t=nqFScWLfusXBNQA5-0
|
|
|
|
// https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?type=design&node-id=17674-276833&mode=design&t=nqFScWLfusXBNQA5-0
|
|
|
|
// https://www.figma.com/file/FkFClTCYKf83RJWoifWgoX/Wallet-v2?type=design&node-id=17675-283206&mode=design&t=nqFScWLfusXBNQA5-0
|