2022-12-01 16:31:03 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import AppLayouts.Chat.views.communities 1.0
|
|
|
|
import AppLayouts.Chat.stores 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
color: Theme.palette.statusAppLayout.rightPanelBackgroundColor
|
|
|
|
CommunityPermissionsView {
|
|
|
|
anchors {
|
|
|
|
fill: parent
|
|
|
|
margins: 50
|
|
|
|
}
|
|
|
|
store: CommunitiesStore {
|
2023-02-01 17:30:41 +00:00
|
|
|
id: mockedCommunity
|
|
|
|
permissionsModel: PermissionsModel.permissionsModel
|
2022-12-01 16:31:03 +00:00
|
|
|
|
|
|
|
function duplicatePermission(index) {
|
|
|
|
logs.logEvent("CommunitiesStore::duplicatePermission - index: " + index)
|
|
|
|
}
|
|
|
|
}
|
2023-01-27 09:22:04 +00:00
|
|
|
|
|
|
|
rootStore: QtObject {
|
|
|
|
readonly property QtObject chatCommunitySectionModule: QtObject {
|
|
|
|
readonly property var model: ChannelsModel {}
|
|
|
|
}
|
|
|
|
|
|
|
|
readonly property QtObject mainModuleInst: QtObject {
|
|
|
|
readonly property QtObject activeSection: QtObject {
|
|
|
|
readonly property string name: "Socks"
|
|
|
|
readonly property string image: ModelsData.icons.socks
|
|
|
|
readonly property color color: "red"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-10 22:40:07 +00:00
|
|
|
onEditPermissionRequested:
|
|
|
|
logs.logEvent("CommunitiesStore::editPermission - index: " + index)
|
|
|
|
onRemovePermissionRequested:
|
|
|
|
logs.logEvent("CommunitiesStore::removePermission - index: " + index)
|
|
|
|
onDuplicatePermissionRequested:
|
|
|
|
logs.logEvent("CommunitiesStore::duplicatePermission - index: " + index)
|
2022-11-24 16:23:54 +00:00
|
|
|
|
2022-12-01 16:31:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 150
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
|
|
|
CommunityPermissionsSettingsPanelEditor {
|
|
|
|
anchors.fill: parent
|
2023-02-01 17:30:41 +00:00
|
|
|
model: mockedCommunity.permissionsModel
|
2022-12-01 16:31:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|