2024-02-16 12:08:45 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQml 2.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
2024-03-04 22:07:09 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
2024-02-16 12:08:45 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import AppLayouts.Profile.helpers 1.0
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
ListModel {
|
|
|
|
id: accountsModel
|
|
|
|
|
2024-02-20 13:26:56 +00:00
|
|
|
ListElement {
|
2024-03-04 22:07:09 +00:00
|
|
|
address: "1"
|
2024-03-29 11:43:49 +00:00
|
|
|
name: "Crypto Kitties"
|
|
|
|
showcaseKey: "1"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.IdVerifiedContacts
|
2024-03-29 11:43:49 +00:00
|
|
|
showcasePosition: 0
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
2024-03-04 22:07:09 +00:00
|
|
|
address: "2"
|
2024-03-29 11:43:49 +00:00
|
|
|
name: "Status"
|
|
|
|
showcaseKey: "2"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Contacts
|
|
|
|
}
|
|
|
|
ListElement {
|
2024-03-29 11:43:49 +00:00
|
|
|
address: "3";
|
|
|
|
name: "Fun Stuff"
|
|
|
|
showcaseKey: "3"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Contacts
|
2024-03-29 11:43:49 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
address: "4"
|
|
|
|
name: "Other Stuff"
|
|
|
|
showcaseKey: "4"
|
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.NoOne
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListModel {
|
2024-03-29 11:43:49 +00:00
|
|
|
id: socialLinksModel
|
2024-03-04 22:07:09 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
ListElement { showcaseKey: "1"; showcasePosition: 0; text: "Twitter"; url: "https://twitter.com/status" }
|
|
|
|
ListElement { showcaseKey: "2"; showcasePosition: 1; text: "Personal Site"; url: "https://status.im" }
|
|
|
|
ListElement { showcaseKey: "3"; showcasePosition: 2; text: "Github"; url: "https://github.com" }
|
|
|
|
ListElement { showcaseKey: "4"; showcasePosition: 3; text: "Youtube"; url: "https://youtube.com" }
|
|
|
|
ListElement { showcaseKey: "5"; showcasePosition: 4; text: "Discord"; url: "https://discord.com" }
|
|
|
|
ListElement { showcaseKey: "6"; showcasePosition: 5; text: "Telegram"; url: "https://t.me/status" }
|
|
|
|
ListElement { showcaseKey: "7"; showcasePosition: 6; text: "Custom"; url: "https://status.im" }
|
2024-03-04 22:07:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
id: collectiblesModel
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-02-20 13:26:56 +00:00
|
|
|
ListElement {
|
2024-03-29 11:43:49 +00:00
|
|
|
uid: 1
|
|
|
|
name: "Collectible 1"
|
|
|
|
showcaseKey: "1"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.IdVerifiedContacts
|
2024-03-29 11:43:49 +00:00
|
|
|
showcasePosition: 0
|
|
|
|
ownership: [
|
|
|
|
ListElement { accountAddress: "1" },
|
|
|
|
ListElement { accountAddress: "3" }
|
|
|
|
]
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
2024-03-29 11:43:49 +00:00
|
|
|
uid: 2
|
|
|
|
name: "Collectible 2"
|
|
|
|
showcaseKey: "2"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Contacts
|
2024-03-29 11:43:49 +00:00
|
|
|
showcasePosition: 2
|
|
|
|
ownership: [
|
|
|
|
ListElement { accountAddress: "1" },
|
|
|
|
ListElement { accountAddress: "2" },
|
|
|
|
ListElement { accountAddress: "3" }
|
|
|
|
]
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
2024-03-29 11:43:49 +00:00
|
|
|
uid: 3
|
|
|
|
name: "Collectible 3"
|
|
|
|
showcaseKey: "3"
|
2024-03-04 22:07:09 +00:00
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Contacts
|
2024-03-29 11:43:49 +00:00
|
|
|
showcasePosition: 1
|
|
|
|
ownership: [
|
|
|
|
ListElement { accountAddress: "3" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
uid: 4
|
|
|
|
name: "Collectible 4"
|
|
|
|
showcaseKey: "4"
|
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.NoOne
|
|
|
|
showcasePosition: 3
|
|
|
|
ownership: [
|
|
|
|
ListElement { accountAddress: "1" },
|
|
|
|
ListElement { accountAddress: "4" }
|
|
|
|
]
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ProfileShowcaseModels {
|
|
|
|
id: showcaseModels
|
|
|
|
|
|
|
|
accountsSourceModel: accountsModel
|
|
|
|
collectiblesSourceModel: collectiblesModel
|
2024-03-08 09:27:45 +00:00
|
|
|
socialLinksSourceModel: socialLinksModel
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
|
2024-02-20 13:26:56 +00:00
|
|
|
ListModel {
|
|
|
|
id: comboBoxModel
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
text: "verified"
|
|
|
|
value: Constants.ShowcaseVisibility.IdVerifiedContacts
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "contacts"
|
|
|
|
value: Constants.ShowcaseVisibility.Contacts
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
text: "all"
|
|
|
|
value: Constants.ShowcaseVisibility.Everyone
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
2024-02-20 13:26:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
component VisibilityComboBox: ComboBox {
|
|
|
|
model: comboBoxModel
|
2024-02-16 12:08:45 +00:00
|
|
|
|
|
|
|
textRole: "text"
|
|
|
|
valueRole: "value"
|
|
|
|
}
|
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
StackView {
|
|
|
|
id: stackView
|
2024-02-16 12:08:45 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.margins: 10
|
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
initialItem: collectiblesView
|
2024-03-29 11:43:49 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Component {
|
|
|
|
id: collectiblesView
|
2024-03-29 11:43:49 +00:00
|
|
|
RowLayout {
|
|
|
|
id: grid
|
|
|
|
spacing: 10
|
|
|
|
//anchors.fill: parent
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Label {
|
|
|
|
text: "Backend models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: accountsModel
|
|
|
|
label: "ACCOUNTS MODEL"
|
|
|
|
}
|
2024-03-29 11:43:49 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Label {
|
|
|
|
text: "Display models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: showcaseModels.accountsVisibleModel
|
|
|
|
label: "IN SHOWCASE"
|
|
|
|
movable: true
|
|
|
|
roles: ["showcaseKey", "showcaseVisibility", "showcasePosition"]
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
onMoveRequested: {
|
|
|
|
showcaseModels.changeAccountPosition(from, to);
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
insetComponent: RowLayout {
|
|
|
|
readonly property var topModel: model
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
RoundButton {
|
|
|
|
text: "❌"
|
|
|
|
onClicked: showcaseModels.setAccountVisibility(
|
2024-03-29 11:43:49 +00:00
|
|
|
model.showcaseKey,
|
|
|
|
Constants.ShowcaseVisibility.NoOne)
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
VisibilityComboBox {
|
|
|
|
property bool completed: false
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
onCurrentValueChanged: {
|
|
|
|
if (!completed || topModel.index < 0)
|
|
|
|
return
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
showcaseModels.setAccountVisibility(
|
2024-03-29 11:43:49 +00:00
|
|
|
topModel.showcaseKey, currentValue)
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
currentIndex = indexOfValue(topModel.showcaseVisibility)
|
|
|
|
completed = true
|
|
|
|
}
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: showcaseModels.accountsHiddenModel
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
label: "HIDDEN"
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
roles: ["showcaseKey", "showcaseVisibility", "showcasePosition"]
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
insetComponent: Button {
|
|
|
|
text: "unhide"
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
onClicked:
|
|
|
|
showcaseModels.setAccountVisibility(
|
|
|
|
model.showcaseKey,
|
|
|
|
Constants.ShowcaseVisibility.IdVerifiedContacts)
|
|
|
|
}
|
|
|
|
}
|
2024-03-29 11:43:49 +00:00
|
|
|
}
|
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Label {
|
|
|
|
text: "Backend models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: collectiblesModel
|
|
|
|
label: "COLLECTIBLES MODEL"
|
|
|
|
}
|
2024-03-29 11:43:49 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2024-03-08 09:27:45 +00:00
|
|
|
Label {
|
|
|
|
text: "Display models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: showcaseModels.collectiblesVisibleModel
|
|
|
|
label: "IN SHOWCASE"
|
|
|
|
movable: true
|
2024-03-29 11:43:49 +00:00
|
|
|
roles: ["showcaseKey", "showcaseVisibility", "showcasePosition", "maxVisibility"]
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
onMoveRequested: {
|
|
|
|
showcaseModels.changeCollectiblePosition(from, to);
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
insetComponent: RowLayout {
|
|
|
|
readonly property var topModel: model
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
RoundButton {
|
|
|
|
text: "❌"
|
|
|
|
onClicked: showcaseModels.setCollectibleVisibility(
|
2024-03-29 11:43:49 +00:00
|
|
|
model.showcaseKey,
|
|
|
|
Constants.ShowcaseVisibility.NoOne)
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VisibilityComboBox {
|
|
|
|
property bool completed: false
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
onCurrentValueChanged: {
|
|
|
|
if (!completed || topModel.index < 0)
|
|
|
|
return
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
showcaseModels.setCollectibleVisibility(
|
2024-03-29 11:43:49 +00:00
|
|
|
topModel.showcaseKey, currentValue)
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
currentIndex = indexOfValue(topModel.showcaseVisibility)
|
|
|
|
completed = true
|
|
|
|
}
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GenericListView {
|
2024-03-29 11:43:49 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2024-03-08 09:27:45 +00:00
|
|
|
|
|
|
|
model: showcaseModels.collectiblesHiddenModel
|
|
|
|
|
|
|
|
label: "HIDDEN"
|
|
|
|
|
|
|
|
roles: ["showcaseKey", "showcaseVisibility", "showcasePosition",
|
|
|
|
"accounts", "maxVisibility"]
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
insetComponent: Button {
|
|
|
|
text: "unhide"
|
|
|
|
|
|
|
|
onClicked:
|
|
|
|
showcaseModels.setCollectibleVisibility(
|
|
|
|
model.showcaseKey,
|
|
|
|
Constants.ShowcaseVisibility.IdVerifiedContacts)
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-08 09:27:45 +00:00
|
|
|
}
|
2024-03-29 11:43:49 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Component {
|
|
|
|
id: webView
|
|
|
|
Flickable {
|
|
|
|
|
|
|
|
contentWidth: webGrid.implicitWidth
|
|
|
|
contentHeight: webGrid.implicitHeight
|
|
|
|
|
|
|
|
Grid {
|
|
|
|
id: webGrid
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
rows: 3
|
|
|
|
columns: 4
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
spacing: 10
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
flow: Grid.TopToBottom
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
Label {
|
|
|
|
text: "Backend models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
|
|
|
|
|
|
|
GenericListView {
|
|
|
|
width: 300
|
|
|
|
height: 300
|
|
|
|
|
|
|
|
model: socialLinksModel
|
|
|
|
label: "SOCIAL LINKS MODEL"
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
|
|
|
width: 300
|
|
|
|
height: 300
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Display models"
|
|
|
|
font.pixelSize: 22
|
|
|
|
padding: 10
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
GenericListView {
|
|
|
|
width: 610
|
|
|
|
height: 300
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
model: showcaseModels.socialLinksVisibleModel
|
|
|
|
|
|
|
|
label: "IN SHOWCASE"
|
|
|
|
movable: true
|
|
|
|
|
|
|
|
onMoveRequested: {
|
|
|
|
showcaseModels.changeSocialLinkPosition(from, to);
|
|
|
|
}
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: `accounts in showcase: [${showcaseModels.visibleAccountsList}]`
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
readonly property string visibilities:
|
|
|
|
JSON.stringify(showcaseModels.accountsVisibilityMap)
|
|
|
|
|
|
|
|
text: `accounts visibilities: [${visibilities}]`
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
}
|
|
|
|
|
2024-03-08 09:27:45 +00:00
|
|
|
RowLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "Collectibles tab"
|
|
|
|
onClicked: {
|
|
|
|
stackView.replace(webView, collectiblesView)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "Web tab"
|
|
|
|
onClicked: {
|
|
|
|
stackView.replace(collectiblesView, webView)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-16 12:08:45 +00:00
|
|
|
Button {
|
|
|
|
text: "SAVE"
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
const accountsToBeSaved = showcaseModels.accountsCurrentState()
|
|
|
|
const collectiblesToBeSaved = showcaseModels.collectiblesCurrentState()
|
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
for (let index = 0; index < accountsModel.count; index++) {
|
|
|
|
let account = accountsModel.get(index)
|
|
|
|
const showcaseAccount = accountsToBeSaved.find(item => item.showcaseKey === account.showcaseKey)
|
2024-02-16 12:08:45 +00:00
|
|
|
|
2024-03-29 11:43:49 +00:00
|
|
|
account.showcasePosition = !!showcaseAccount ? showcaseAccount.showcasePosition : 0
|
|
|
|
account.showcaseVisibility = !!showcaseAccount ? showcaseAccount.showcaseVisibility : Constants.ShowcaseVisibility.NoOne
|
|
|
|
accountsModel.set(index, account)
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let index = 0; index < collectiblesModel.count; index++) {
|
|
|
|
let collectible = collectiblesModel.get(index)
|
|
|
|
const showcaseCollectible = collectiblesToBeSaved.find(item => item.showcaseKey === collectible.showcaseKey)
|
|
|
|
|
|
|
|
collectible.showcasePosition = !!showcaseCollectible ? showcaseCollectible.showcasePosition : 0
|
|
|
|
collectible.showcaseVisibility = !!showcaseCollectible ? showcaseCollectible.showcaseVisibility : Constants.ShowcaseVisibility.NoOne
|
|
|
|
collectiblesModel.set(index, collectible)
|
|
|
|
}
|
2024-02-16 12:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.margins: 10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// category: Models
|