2023-11-09 11:21:56 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
2024-01-16 16:22:05 +00:00
|
|
|
import StatusQ.Models 0.1
|
2023-11-09 11:21:56 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
|
|
|
import AppLayouts.Wallet.panels 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Horizontal
|
|
|
|
|
|
|
|
ManageCollectiblesModel {
|
|
|
|
id: collectiblesModel
|
|
|
|
}
|
|
|
|
|
2024-01-16 16:22:05 +00:00
|
|
|
RolesRenamingModel {
|
|
|
|
id: renamedModel
|
|
|
|
sourceModel: ctrlEmptyModel.checked ? null : collectiblesModel
|
|
|
|
mapping: [
|
|
|
|
RoleRename {
|
|
|
|
from: "uid"
|
|
|
|
to: "symbol"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2024-01-26 15:39:42 +00:00
|
|
|
ManageCollectiblesPanel {
|
|
|
|
id: showcasePanel
|
|
|
|
|
2023-11-09 11:21:56 +00:00
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
2024-01-26 15:39:42 +00:00
|
|
|
|
|
|
|
controller: ManageTokensController {
|
|
|
|
sourceModel: renamedModel
|
|
|
|
settingsKey: "WalletCollectibles"
|
2024-03-01 02:04:36 +00:00
|
|
|
serializeAsCollectibles: true
|
|
|
|
|
|
|
|
onRequestSaveSettings: (jsonData) => saveToQSettings(jsonData)
|
|
|
|
onRequestLoadSettings: loadFromQSettings()
|
|
|
|
onRequestClearSettings: clearQSettings()
|
2023-11-09 11:21:56 +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-11-09 11:21:56 +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-11-09 11:21:56 +00:00
|
|
|
Button {
|
2024-01-19 09:53:32 +00:00
|
|
|
enabled: showcasePanel.dirty
|
2023-11-09 11:21:56 +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-11-09 11:21:56 +00:00
|
|
|
text: "Clear settings"
|
|
|
|
onClicked: showcasePanel.clearSettings()
|
|
|
|
}
|
|
|
|
|
|
|
|
Switch {
|
|
|
|
id: ctrlEmptyModel
|
|
|
|
text: "Empty model"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Panels
|
2024-01-26 15:39:42 +00:00
|
|
|
// https://www.figma.com/file/eM26pyHZUeAwMLviaS1KJn/%E2%9A%99%EF%B8%8F-Wallet-Settings%3A-Manage-Tokens
|