2022-11-08 21:23:55 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.popups 1.0
|
2022-11-08 21:23:55 +00:00
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
PopupBackground {
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
|
|
|
|
CreateChannelPopup {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
modal: false
|
|
|
|
closePolicy: Popup.NoAutoClose
|
|
|
|
|
|
|
|
isEdit: isEditCheckBox.checked
|
|
|
|
isDeleteable: isDeleteableCheckBox.checked
|
|
|
|
|
|
|
|
emojiPopup: Popup {
|
|
|
|
id: emojiPopup
|
|
|
|
|
|
|
|
parent: root
|
|
|
|
|
|
|
|
property var emojiSize
|
|
|
|
|
|
|
|
Button {
|
|
|
|
text: "😃"
|
|
|
|
onClicked: {
|
|
|
|
emojiPopup.emojiSelected(text, false)
|
|
|
|
emojiPopup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
signal emojiSelected(string emoji, bool atCu)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-11-17 06:17:03 +00:00
|
|
|
onCreateCommunityChannel: function(chName, chDescription, chEmoji, chColor, chCategoryId) {
|
2022-11-08 21:23:55 +00:00
|
|
|
logs.logEvent("onCreateCommunityChannel",
|
|
|
|
["chName", "chDescription", "chEmoji", "chColor", "chCategoryId"], arguments)
|
|
|
|
}
|
|
|
|
|
2022-11-17 06:17:03 +00:00
|
|
|
onEditCommunityChannel: function(chName, chDescription, chEmoji, chColor, chCategoryId) {
|
2022-11-08 21:23:55 +00:00
|
|
|
logs.logEvent("onEditCommunityChannel",
|
|
|
|
["chName", "chDescription", "chEmoji", "chColor", "chCategoryId"], arguments)
|
|
|
|
}
|
|
|
|
|
|
|
|
onDeleteCommunityChannel: () => {
|
|
|
|
logs.logEvent("onDeleteCommunityChannel")
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: open()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: isEditCheckBox
|
|
|
|
|
|
|
|
text: "isEdit"
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: isDeleteableCheckBox
|
|
|
|
|
|
|
|
enabled: isEditCheckBox.checked
|
|
|
|
text: "isDeleteable"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|