2022-12-20 00:03:25 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
2023-02-08 12:39:47 +00:00
|
|
|
import QtQuick.Layouts 1.14
|
2022-12-20 00:03:25 +00:00
|
|
|
|
|
|
|
import AppLayouts.Chat.views.communities 1.0
|
|
|
|
import AppLayouts.Chat.stores 1.0
|
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
import Storybook 1.0
|
2022-12-20 00:03:25 +00:00
|
|
|
import Models 1.0
|
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
Logs { id: logs }
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
Pane {
|
|
|
|
id: root
|
2023-01-23 15:51:12 +00:00
|
|
|
|
2023-02-08 12:39:47 +00:00
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
CommunityNewPermissionView {
|
2023-02-08 12:39:47 +00:00
|
|
|
id: communityNewPermissionView
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
isEditState: isEditStateCheckBox.checked
|
|
|
|
isPrivate: isPrivateCheckBox.checked
|
2023-02-14 20:39:18 +00:00
|
|
|
duplicationWarningVisible: isDuplicationWarningVisibleCheckBox.checked
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
store: CommunitiesStore {
|
|
|
|
readonly property var assetsModel: AssetsModel {}
|
|
|
|
readonly property var collectiblesModel: CollectiblesModel {}
|
|
|
|
readonly property var channelsModel: ChannelsModel {}
|
|
|
|
readonly property var permissionConflict: QtObject {
|
|
|
|
property bool exists: true
|
|
|
|
property string holdings: "1 ETH"
|
|
|
|
property string permissions: "View and Post"
|
|
|
|
property string channels: "#general"
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
}
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
readonly property bool isOwner: isOwnerCheckBox.checked
|
|
|
|
|
2023-02-08 12:39:47 +00:00
|
|
|
function createPermission(holdings, permissions, isPrivate, channels) {
|
|
|
|
logs.logEvent("CommunitiesStore::creatPermission")
|
|
|
|
}
|
|
|
|
|
2023-02-20 08:31:39 +00:00
|
|
|
function editPermission(key, holdings, permissions, channels, isPrivate) {
|
|
|
|
logs.logEvent("CommunitiesStore::editPermission - key: " + key)
|
2023-01-20 11:22:04 +00:00
|
|
|
}
|
|
|
|
|
2023-02-20 08:31:39 +00:00
|
|
|
function removePermission(key) {
|
|
|
|
logs.logEvent("CommunitiesStore::removePermission - key: " + key)
|
2023-01-20 11:22:04 +00:00
|
|
|
}
|
2022-12-20 00:03:25 +00:00
|
|
|
}
|
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
rootStore: QtObject {
|
|
|
|
readonly property QtObject chatCommunitySectionModule: QtObject {
|
|
|
|
readonly property var model: ChannelsModel {}
|
|
|
|
}
|
|
|
|
|
|
|
|
readonly property QtObject mainModuleInst: QtObject {
|
2022-12-20 00:03:25 +00:00
|
|
|
|
2023-01-20 11:22:04 +00:00
|
|
|
readonly property QtObject activeSection: QtObject {
|
|
|
|
readonly property string name: "Socks"
|
|
|
|
readonly property string image: ModelsData.icons.socks
|
2023-02-15 09:26:48 +00:00
|
|
|
readonly property string color: "red"
|
2023-01-20 11:22:04 +00:00
|
|
|
}
|
2022-12-20 00:03:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-20 11:22:04 +00:00
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
2023-02-08 12:39:47 +00:00
|
|
|
SplitView.preferredHeight: 160
|
2023-01-20 11:22:04 +00:00
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
|
2023-02-08 12:39:47 +00:00
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: isOwnerCheckBox
|
|
|
|
|
|
|
|
text: "Is owner"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: isEditStateCheckBox
|
|
|
|
|
|
|
|
text: "Is edit state"
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: isPrivateCheckBox
|
|
|
|
|
|
|
|
text: "Is private"
|
|
|
|
}
|
2023-02-14 20:39:18 +00:00
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: isDuplicationWarningVisibleCheckBox
|
|
|
|
|
|
|
|
text: "Is duplication warning visible"
|
|
|
|
}
|
2023-02-08 12:39:47 +00:00
|
|
|
}
|
|
|
|
|
2023-02-08 23:22:57 +00:00
|
|
|
Button {
|
|
|
|
text: "Reset changes"
|
2023-02-08 12:39:47 +00:00
|
|
|
|
2023-02-08 23:22:57 +00:00
|
|
|
onClicked: communityNewPermissionView.resetChanges()
|
2023-02-08 12:39:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Is dirty: " + communityNewPermissionView.dirty
|
|
|
|
}
|
2023-01-20 11:22:04 +00:00
|
|
|
}
|
|
|
|
}
|
2022-12-20 00:03:25 +00:00
|
|
|
}
|