status-desktop/storybook/pages/CreateChannelPopupPage.qml
Noelia 0ab8a62896 feat(Communities): Communities folder reorganization
- Renamed main `CommunitiesPortal` folder to `Communities`.
- Created new `layouts` folder.
- Moved layout files from chat to communities.
- Created new `helpers` folder.
- Moved helpers files from chat to communities.
- Moved `controls/community` files from chat to communities `controls`.
- Moved `panels/communities` files from chat to communities `panels`.
- Moved `popups/community` files from chat to communities `popups`.
- Moved `views/community` files from chat to communities `views`.
- Moved `CommunityBanner` file from shared to `Communities/controls`. Only used in communities context.
- Moved `CommunitySettingsView` and `CommunityColumnView` files from chat to communities `views`.
- Moved `PermissionsStore.qml` file to `shared/stores`.
- Updated imports.
- Updated storybook.

Part of #6204
2023-06-28 14:28:47 +02:00

90 lines
2.2 KiB
QML

import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import Storybook 1.0
import AppLayouts.Communities.popups 1.0
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)
}
onCreateCommunityChannel: function(chName, chDescription, chEmoji, chColor, chCategoryId) {
logs.logEvent("onCreateCommunityChannel",
["chName", "chDescription", "chEmoji", "chColor", "chCategoryId"], arguments)
}
onEditCommunityChannel: function(chName, chDescription, chEmoji, chColor, chCategoryId) {
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"
}
}
}
}