mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-28 23:35:13 +00:00
1cbb3e2ad3
- Created `CommunityPermissionsView` and integrated into the flow. - Created `PermissionItem` component. - Added `holdingsListModel`, `permissionsObjectModel` and `channelsListModel` flows with mocked data. - Added `isPrivate` permission property. - Added button header in `SettingsPageLayout` - Added signals/methods for edit/duplicate/remove permissions - Created new file `OperatorsUtils.qml` specific for `Operators`
62 lines
1.6 KiB
QML
62 lines
1.6 KiB
QML
import QtQuick 2.14
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import StatusQ.Components 0.1
|
|
import StatusQ.Controls 0.1
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
ColumnLayout {
|
|
spacing: 20
|
|
StatusItemSelector {
|
|
id: selector
|
|
icon: "qrc:/images/SNT.png"
|
|
iconSize: 24
|
|
title: "Item Selector Title"
|
|
defaultItemText: "Example: Empty items"
|
|
|
|
itemsModel: ListModel {
|
|
id: model
|
|
}
|
|
|
|
StatusDropdown {
|
|
id: dropdown
|
|
|
|
parent: selector.addButton
|
|
width: 200
|
|
contentItem: ColumnLayout {
|
|
spacing: 10
|
|
StatusInput {
|
|
id: input
|
|
text: "Sample"
|
|
Layout.fillWidth: true
|
|
}
|
|
StatusButton {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: "Add element"
|
|
onClicked: {
|
|
model.append({
|
|
text: input.text,
|
|
imageSource: "qrc:/images/SNT.png",
|
|
operator: model.count > 0 ? OperatorsUtils.Operators.Or : OperatorsUtils.Operators.None
|
|
})
|
|
|
|
dropdown.close()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
addButton.onClicked: {
|
|
dropdown.x = mouse.x
|
|
dropdown.y = mouse.y
|
|
dropdown.open()
|
|
}
|
|
}
|
|
|
|
StatusButton {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: "Clear list"
|
|
onClicked: { selector.itemsModel.clear() }
|
|
}
|
|
}
|