2023-03-20 12:29:05 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2024-02-15 17:26:05 +00:00
|
|
|
import QtQml 2.15
|
2023-03-20 12:29:05 +00:00
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
2024-02-15 17:26:05 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Utils 0.1
|
2023-03-20 12:29:05 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2023-05-02 08:01:04 +00:00
|
|
|
import shared.controls 1.0
|
2023-03-20 12:29:05 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import AppLayouts.Profile.controls 1.0
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
DoubleFlickableWithFolding {
|
2023-03-20 12:29:05 +00:00
|
|
|
id: root
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
readonly property var showcaseRoles: ["showcaseVisibility", "order"]
|
|
|
|
|
|
|
|
required property string keyRole
|
|
|
|
required property var roleNames
|
|
|
|
required property var filterFunc
|
|
|
|
|
2023-03-20 12:29:05 +00:00
|
|
|
property var baseModel
|
2023-11-01 16:54:22 +00:00
|
|
|
property var showcaseModel
|
2023-03-20 12:29:05 +00:00
|
|
|
|
|
|
|
property Component showcaseDraggableDelegateComponent
|
2024-02-15 17:26:05 +00:00
|
|
|
property Component hiddenDraggableDelegateComponent
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-21 13:39:27 +00:00
|
|
|
property Component additionalFooterComponent
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
property string emptyInShowcasePlaceholderText
|
|
|
|
property string emptyHiddenPlaceholderText
|
|
|
|
|
|
|
|
readonly property Connections showcaseUpdateConnections: Connections {
|
|
|
|
target: root.showcaseModel
|
|
|
|
|
|
|
|
function onBaseModelFilterConditionsMayHaveChanged() {
|
|
|
|
root.updateBaseModelFilters()
|
|
|
|
}
|
|
|
|
}
|
2023-11-01 16:54:22 +00:00
|
|
|
|
|
|
|
function reset() {
|
2024-02-15 17:26:05 +00:00
|
|
|
root.showcaseModel.clear()
|
2023-11-01 16:54:22 +00:00
|
|
|
updateBaseModelFilters()
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateBaseModelFilters() {
|
|
|
|
// Reset base model to update filter conditions
|
2024-02-15 17:26:05 +00:00
|
|
|
hiddenListView.model = null
|
|
|
|
hiddenListView.model = root.baseModel
|
2023-11-01 16:54:22 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
signal showcaseEntryChanged()
|
2023-11-01 16:54:22 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
readonly property var dragHiddenItemKey: ["x-status-draggable-showcase-item-hidden"]
|
|
|
|
readonly property var dragShowcaseItemKey: ["x-status-draggable-showcase-item"]
|
|
|
|
|
|
|
|
property bool isAnyShowcaseDragActive: false
|
|
|
|
property bool isAnyHiddenDragActive: false
|
2024-02-26 11:07:06 +00:00
|
|
|
|
|
|
|
property int additionalHeaderComponentWidth: 350 // by design
|
|
|
|
property int additionalHeaderComponentHeight: 40 // by design
|
2023-11-01 16:54:22 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
clip: true
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
ScrollBar.vertical: StatusScrollBar {
|
|
|
|
policy: ScrollBar.AsNeeded
|
|
|
|
visible: resolveVisibility(policy, root.height, root.contentHeight)
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
flickable1: EmptyShapeRectangleFooterListView {
|
|
|
|
id: inShowcaseListView
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
model: root.showcaseModel
|
|
|
|
width: root.width
|
|
|
|
placeholderText: root.emptyInShowcasePlaceholderText
|
2024-02-23 07:14:55 +00:00
|
|
|
footerHeight: ProfileUtils.defaultDelegateHeight
|
|
|
|
footerContentVisible: !dropAreaRow.visible
|
|
|
|
spacing: Style.current.halfPadding
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
header: FoldableHeader {
|
|
|
|
width: ListView.view.width
|
|
|
|
title: qsTr("In showcase")
|
|
|
|
folded: root.flickable1Folded
|
2024-02-26 11:07:06 +00:00
|
|
|
rightAdditionalComponent: VisibilityDropAreaButtonsRow {
|
|
|
|
width: d.additionalHeaderComponentWidth
|
|
|
|
height: d.additionalHeaderComponentHeight
|
|
|
|
margins: 0
|
|
|
|
visible: root.flickable1Folded &&
|
|
|
|
(d.isAnyHiddenDragActive ||
|
|
|
|
parent.containsDrag ||
|
|
|
|
everyoneContainsDrag ||
|
|
|
|
contactsContainsDrag ||
|
|
|
|
verifiedContainsDrag)
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
onToggleFolding: root.flip1Folding()
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
delegate: DropArea {
|
|
|
|
id: showcaseDelegateRoot
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
property int visualIndex: index
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
width: ListView.view.width
|
|
|
|
height: visible && showcaseDraggableDelegateLoader.item ? showcaseDraggableDelegateLoader.item.height : 0
|
2024-01-13 03:24:57 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
keys: d.dragShowcaseItemKey
|
2024-02-15 17:26:05 +00:00
|
|
|
visible: model.showcaseVisibility !== Constants.ShowcaseVisibility.NoOne
|
|
|
|
|
|
|
|
onEntered: function(drag) {
|
|
|
|
const from = drag.source.visualIndex
|
|
|
|
const to = showcaseDraggableDelegateLoader.item.visualIndex
|
|
|
|
if (to === from)
|
|
|
|
return
|
|
|
|
root.showcaseEntryChanged()
|
|
|
|
root.showcaseModel.move(from, to, 1)
|
|
|
|
drag.accept()
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO:
|
|
|
|
// This animation is causing issues when there are no elements in the showcase list.
|
|
|
|
// Reenable it once the refactor of the models and delegates is done (simplified): #13498
|
|
|
|
// ListView.onRemove: SequentialAnimation {
|
|
|
|
// PropertyAction { target: showcaseDelegateRoot; property: "ListView.delayRemove"; value: true }
|
|
|
|
// NumberAnimation { target: showcaseDelegateRoot; property: "scale"; to: 0; easing.type: Easing.InOutQuad }
|
|
|
|
// PropertyAction { target: showcaseDelegateRoot; property: "ListView.delayRemove"; value: false }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// In showcase delegate item container:
|
|
|
|
Loader {
|
|
|
|
id: showcaseDraggableDelegateLoader
|
|
|
|
|
|
|
|
property var modelData: model
|
|
|
|
property var dragParentData: root
|
|
|
|
property int visualIndexData: index
|
2024-02-23 07:14:55 +00:00
|
|
|
|
|
|
|
width: parent.width
|
2024-02-23 11:28:19 +00:00
|
|
|
sourceComponent: root.showcaseDraggableDelegateComponent
|
2024-02-23 07:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delegate shadow background when dragging:
|
|
|
|
ShadowDelegate {
|
|
|
|
id: showcaseShadow
|
|
|
|
|
|
|
|
visible: showcaseDraggableDelegateLoader.item && showcaseDraggableDelegateLoader.item.dragActive
|
|
|
|
onVisibleChanged: d.isAnyShowcaseDragActive = visible
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
2024-02-23 11:28:19 +00:00
|
|
|
|
|
|
|
Binding {
|
|
|
|
when: dropAreaRow.visible
|
|
|
|
target: showcaseDraggableDelegateLoader.item
|
|
|
|
property: "blurState"
|
|
|
|
value: true
|
|
|
|
restoreMode: Binding.RestoreBindingOrValue
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
// Overlaid showcase listview content drop area:
|
2024-02-15 17:26:05 +00:00
|
|
|
DropArea {
|
|
|
|
anchors.bottom: parent.bottom
|
2024-02-23 07:14:55 +00:00
|
|
|
width: parent.width
|
|
|
|
height: parent.contentHeight
|
|
|
|
keys: d.dragHiddenItemKey
|
|
|
|
|
|
|
|
// Shown at the bottom of the listview
|
|
|
|
VisibilityDropAreaButtonsRow {
|
|
|
|
id: dropAreaRow
|
2024-02-15 17:26:05 +00:00
|
|
|
|
|
|
|
width: parent.width
|
2024-02-23 07:14:55 +00:00
|
|
|
height: ProfileUtils.defaultDelegateHeight
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
visible: d.isAnyHiddenDragActive ||
|
|
|
|
parent.containsDrag ||
|
|
|
|
everyoneContainsDrag ||
|
|
|
|
contactsContainsDrag ||
|
|
|
|
verifiedContainsDrag
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
flickable2: EmptyShapeRectangleFooterListView {
|
|
|
|
id: hiddenListView
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
model: root.baseModel
|
|
|
|
width: root.width
|
|
|
|
placeholderText: root.emptyHiddenPlaceholderText
|
2024-02-23 07:14:55 +00:00
|
|
|
footerHeight: ProfileUtils.defaultDelegateHeight
|
|
|
|
footerContentVisible: !hiddenDropAreaButton.visible
|
2024-02-15 17:26:05 +00:00
|
|
|
empty: root.showcaseModel.hiddenCount === 0 && !root.flickable2Folded // TO BE REMOVE: #13498
|
2024-02-21 13:39:27 +00:00
|
|
|
additionalFooterComponent: root.additionalFooterComponent
|
2024-02-23 07:14:55 +00:00
|
|
|
spacing: Style.current.halfPadding
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
header: FoldableHeader {
|
|
|
|
width: ListView.view.width
|
|
|
|
title: qsTr("Hidden")
|
|
|
|
folded: root.flickable2Folded
|
2024-02-26 11:07:06 +00:00
|
|
|
rightAdditionalComponent: VisibilityDropAreaButton {
|
|
|
|
visible: root.flickable2Folded && (d.isAnyShowcaseDragActive || parent.containsDrag || containsDrag)
|
|
|
|
width: d.additionalHeaderComponentWidth
|
|
|
|
height: d.additionalHeaderComponentHeight
|
|
|
|
rightInset: 1
|
|
|
|
text: qsTr("Hide")
|
|
|
|
dropAreaKeys: d.dragShowcaseItemKey
|
|
|
|
|
|
|
|
onDropped: {
|
|
|
|
root.showcaseModel.setVisibilityByIndex(drop.source.visualIndex, visibility)
|
|
|
|
root.showcaseEntryChanged()
|
|
|
|
}
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
onToggleFolding: root.flip2Folding()
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
delegate: DropArea {
|
|
|
|
id: hiddenDelegateRoot
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
property int visualIndex: index
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
visible: root.filterFunc(model)
|
|
|
|
width: ListView.view.width
|
|
|
|
height: visible && hiddenDraggableDelegateLoader.item ? hiddenDraggableDelegateLoader.item.height : 0
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
keys: d.dragShowcaseItemKey
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
onEntered: function(drag) {
|
|
|
|
drag.accept()
|
|
|
|
}
|
2023-11-01 16:54:22 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
onDropped: function(drop) {
|
|
|
|
root.showcaseModel.setVisibilityByIndex(drop.source.visualIndex, Constants.ShowcaseVisibility.NoOne)
|
|
|
|
root.showcaseEntryChanged()
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
// Hidden delegate item container:
|
|
|
|
Loader {
|
|
|
|
id: hiddenDraggableDelegateLoader
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
property var modelData: model
|
|
|
|
property var dragParentData: root
|
|
|
|
property int visualIndexData: hiddenDelegateRoot.visualIndex
|
2024-02-23 07:14:55 +00:00
|
|
|
|
|
|
|
width: parent.width
|
2024-02-23 11:28:19 +00:00
|
|
|
sourceComponent: root.hiddenDraggableDelegateComponent
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
// Delegate shadow background when dragging:
|
2024-02-23 07:14:55 +00:00
|
|
|
ShadowDelegate {
|
|
|
|
id: hiddenShadow
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
visible: hiddenDraggableDelegateLoader.item && hiddenDraggableDelegateLoader.item.dragActive
|
2024-02-23 07:14:55 +00:00
|
|
|
onVisibleChanged: d.isAnyHiddenDragActive = visible
|
2024-02-23 11:28:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Binding {
|
|
|
|
when: hiddenDropAreaButton.visible
|
|
|
|
target: hiddenDraggableDelegateLoader.item
|
|
|
|
property: "blurState"
|
|
|
|
value: true
|
|
|
|
restoreMode: Binding.RestoreBindingOrValue
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
// Overlaid hidden listview content drop area:
|
2024-02-15 17:26:05 +00:00
|
|
|
DropArea {
|
2024-02-23 07:14:55 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
height: parent.contentHeight
|
|
|
|
keys: d.dragShowcaseItemKey
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
// Shown at the top of the listview
|
|
|
|
VisibilityDropAreaButton {
|
|
|
|
id: hiddenDropAreaButton
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: hiddenListView.headerItem.height + Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
visible: d.isAnyShowcaseDragActive || parent.containsDrag || hiddenDropAreaButton.containsDrag
|
|
|
|
width: parent.width - Style.current.padding
|
|
|
|
height: ProfileUtils.defaultDelegateHeight - Style.current.padding
|
|
|
|
text: qsTr("Hide")
|
|
|
|
dropAreaKeys: d.dragShowcaseItemKey
|
|
|
|
|
|
|
|
onDropped: {
|
|
|
|
root.showcaseModel.setVisibilityByIndex(drop.source.visualIndex, visibility)
|
|
|
|
root.showcaseEntryChanged()
|
|
|
|
root.updateBaseModelFilters()
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
2024-02-15 17:26:05 +00:00
|
|
|
}
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
component VisibilityDropAreaButton: AbstractButton {
|
|
|
|
id: visibilityDropAreaButton
|
2024-02-15 17:26:05 +00:00
|
|
|
|
|
|
|
readonly property alias containsDrag: dropArea.containsDrag
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-23 07:14:55 +00:00
|
|
|
property int showcaseVisibility: Constants.ShowcaseVisibility.NoOne
|
|
|
|
property var dropAreaKeys
|
|
|
|
|
|
|
|
signal dropped(var drop, int visibility)
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
padding: Style.current.halfPadding
|
|
|
|
spacing: padding/2
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
icon.color: Theme.palette.primaryColor1
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
background: ShapeRectangle {
|
2024-02-23 07:14:55 +00:00
|
|
|
path.strokeColor: dropArea.containsDrag ? Theme.palette.primaryColor2 : Theme.palette.directColor7
|
|
|
|
path.fillColor: dropArea.containsDrag ? Theme.palette.primaryColor3 : Theme.palette.baseColor4
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
DropArea {
|
|
|
|
id: dropArea
|
2024-02-23 07:14:55 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
anchors.fill: parent
|
2024-02-23 07:14:55 +00:00
|
|
|
keys: visibilityDropAreaButton.dropAreaKeys
|
|
|
|
|
2023-03-20 12:29:05 +00:00
|
|
|
onEntered: function(drag) {
|
|
|
|
drag.accept()
|
|
|
|
}
|
|
|
|
|
|
|
|
onDropped: function(drop) {
|
2024-02-23 07:14:55 +00:00
|
|
|
visibilityDropAreaButton.dropped(drop, visibilityDropAreaButton.showcaseVisibility)
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-15 17:26:05 +00:00
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
contentItem: Item {
|
|
|
|
RowLayout {
|
|
|
|
width: Math.min(parent.width, implicitWidth)
|
|
|
|
anchors.centerIn: parent
|
2024-02-23 07:14:55 +00:00
|
|
|
spacing: visibilityDropAreaButton.spacing
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
StatusIcon {
|
|
|
|
width: 20
|
|
|
|
height: width
|
2024-02-23 07:14:55 +00:00
|
|
|
icon: ProfileUtils.visibilityIcon(visibilityDropAreaButton.showcaseVisibility)
|
|
|
|
color: visibilityDropAreaButton.icon.color
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
2024-02-23 07:14:55 +00:00
|
|
|
font.pixelSize: Style.current.additionalTextSize
|
2024-02-15 17:26:05 +00:00
|
|
|
font.weight: Font.Medium
|
|
|
|
elide: Text.ElideRight
|
2024-02-23 07:14:55 +00:00
|
|
|
color: visibilityDropAreaButton.icon.color
|
|
|
|
text: visibilityDropAreaButton.text
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-02-23 07:14:55 +00:00
|
|
|
|
|
|
|
component VisibilityDropAreaButtonsRow: Item {
|
|
|
|
id: visibilityDropAreaRow
|
|
|
|
|
|
|
|
readonly property bool everyoneContainsDrag: dropAreaEveryone.containsDrag
|
|
|
|
readonly property bool contactsContainsDrag: dropAreaContacts.containsDrag
|
|
|
|
readonly property bool verifiedContainsDrag: dropAreaVerified.containsDrag
|
2024-02-26 11:07:06 +00:00
|
|
|
property int margins: Style.current.halfPadding
|
2024-02-23 07:14:55 +00:00
|
|
|
|
|
|
|
function dropped(drop, visibility) {
|
|
|
|
var showcaseObj = drop.source.showcaseObj
|
|
|
|
|
|
|
|
// need to set total balance for an asset
|
|
|
|
if (drop.source.totalValue !== undefined) {
|
|
|
|
showcaseObj.enabledNetworkBalance = drop.source.totalValue
|
|
|
|
}
|
|
|
|
|
|
|
|
var tmpObj = Object()
|
|
|
|
root.roleNames.forEach(role => tmpObj[role] = showcaseObj[role])
|
|
|
|
tmpObj.showcaseVisibility = visibility
|
|
|
|
root.showcaseModel.upsertItemJson(JSON.stringify(tmpObj))
|
|
|
|
root.showcaseEntryChanged()
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
anchors.fill: parent
|
2024-02-26 11:07:06 +00:00
|
|
|
anchors.margins: visibilityDropAreaRow.margins
|
2024-02-23 07:14:55 +00:00
|
|
|
spacing: Style.current.halfPadding
|
|
|
|
|
|
|
|
VisibilityDropAreaButton {
|
|
|
|
id: dropAreaEveryone
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Everyone
|
|
|
|
text: qsTr("Everyone")
|
|
|
|
dropAreaKeys: d.dragHiddenItemKey
|
|
|
|
|
|
|
|
onDropped: visibilityDropAreaRow.dropped(drop, visibility)
|
|
|
|
}
|
|
|
|
|
|
|
|
VisibilityDropAreaButton {
|
|
|
|
id: dropAreaContacts
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.Contacts
|
|
|
|
text: qsTr("Contacts")
|
|
|
|
dropAreaKeys: d.dragHiddenItemKey
|
|
|
|
|
|
|
|
onDropped: visibilityDropAreaRow.dropped(drop, visibility)
|
|
|
|
}
|
|
|
|
|
|
|
|
VisibilityDropAreaButton {
|
|
|
|
id: dropAreaVerified
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
showcaseVisibility: Constants.ShowcaseVisibility.IdVerifiedContacts
|
|
|
|
text: qsTr("Verified")
|
|
|
|
dropAreaKeys: d.dragHiddenItemKey
|
|
|
|
|
|
|
|
onDropped: visibilityDropAreaRow.dropped(drop, visibility)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
component ShadowDelegate: Rectangle {
|
|
|
|
width: parent.width
|
|
|
|
height: ProfileUtils.defaultDelegateHeight
|
|
|
|
anchors.centerIn: parent
|
|
|
|
color: Theme.palette.baseColor5
|
|
|
|
radius: Style.current.radius
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|