2023-04-26 10:01:22 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.controls 1.0
|
2023-04-26 10:01:22 +00:00
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var assetsModel: AssetsModel {}
|
|
|
|
property var collectiblesModel: CollectiblesModel {}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
spacing: 16
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "1 permission:"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.shortPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "2 short permissions:"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.twoShortPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "2 long permissions:"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.twoLongPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "Three short permissions:"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.threeShortPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "More than 2 permissions with short 1st and 2nd ones:"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.moreThanTwoInitialShortPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
}
|
|
|
|
|
2024-10-03 16:50:43 +00:00
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "Private + unmet permissions:"
|
|
|
|
}
|
|
|
|
|
|
|
|
PermissionsRow {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.privatePermissionsMemberNotMetModel
|
|
|
|
requirementsMet: false
|
|
|
|
}
|
|
|
|
|
2023-04-26 10:01:22 +00:00
|
|
|
Label {
|
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
|
|
|
|
text: "5 permissions - long ones"
|
|
|
|
}
|
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
PermissionsRow {
|
2023-04-26 10:01:22 +00:00
|
|
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
|
|
|
Layout.preferredHeight: heighSliderEditor.value
|
|
|
|
Layout.bottomMargin: spacing
|
|
|
|
|
|
|
|
assetsModel: root.assetsModel
|
|
|
|
collectiblesModel: root.collectiblesModel
|
|
|
|
model: PermissionsModel.longPermissionsModel
|
|
|
|
requirementsMet: permissionsMetCheckEditor.checked
|
|
|
|
|
|
|
|
spacing: spacingSliderEditor.value
|
|
|
|
padding: paddingSliderEditor.value
|
|
|
|
fontPixelSize: 13
|
|
|
|
overlapping: overlappingSliderEditor.value
|
|
|
|
overlappingBorder: overlappingBorderSliderEditor.value
|
|
|
|
backgroundRadius: 10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: permissionsMetCheckEditor
|
|
|
|
|
|
|
|
text: "Are permissions met?"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
2024-10-03 16:50:43 +00:00
|
|
|
text: "Row height:"
|
2023-04-26 10:01:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: heighSliderEditor
|
|
|
|
|
|
|
|
value: 32
|
|
|
|
from: 24
|
|
|
|
to: 64
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Overlapping:"
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: overlappingSliderEditor
|
|
|
|
|
|
|
|
value: 8
|
|
|
|
from: 0
|
|
|
|
to: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Overlapping border:"
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: overlappingBorderSliderEditor
|
|
|
|
|
|
|
|
value: 2
|
|
|
|
from: 0
|
|
|
|
to: 8
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Spacing:"
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: spacingSliderEditor
|
|
|
|
|
|
|
|
value: 4
|
|
|
|
from: 0
|
|
|
|
to: 16
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Padding:"
|
|
|
|
}
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
id: paddingSliderEditor
|
|
|
|
|
|
|
|
value: 2
|
|
|
|
from: 0
|
|
|
|
to: 8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Components
|
2023-10-03 11:56:30 +00:00
|
|
|
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=28570-546277&t=PVEC7ehRew4RnGFa-0
|
|
|
|
// https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=8159%3A416159&t=bTEq7jsSZT0nfC4y-1
|
|
|
|
// https://www.figma.com/file/WQZcp6S0EnzxdTL4taoKDv/Design-System-for-Mobile?node-id=17582-215241&t=8cRmw5jIlzUtfJbY-0
|