2022-03-23 15:38:23 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Dialogs 1.3
|
|
|
|
import QtGraphicalEffects 1.13
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.popups 1.0
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Layout 0.1
|
|
|
|
import StatusQ.Components 0.1
|
2022-05-18 12:21:03 +00:00
|
|
|
import StatusQ.Popups 0.1
|
2022-03-23 15:38:23 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Controls.Validators 0.1
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
import "../../controls/community"
|
|
|
|
|
2022-06-16 09:41:21 +00:00
|
|
|
import "../../../CommunitiesPortal/controls"
|
|
|
|
import "../../../CommunitiesPortal/panels"
|
|
|
|
|
2022-03-23 15:38:23 +00:00
|
|
|
Flickable {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property alias name: nameInput.text
|
|
|
|
property alias description: descriptionTextInput.text
|
2022-05-26 15:46:02 +00:00
|
|
|
property alias introMessage: introMessageTextInput.text
|
|
|
|
property alias outroMessage: outroMessageTextInput.text
|
|
|
|
property alias color: colorPicker.color
|
2022-06-09 14:59:54 +00:00
|
|
|
property alias tags: tagsPicker.tags
|
|
|
|
property alias selectedTags: tagsPicker.selectedTags
|
2022-05-26 15:46:02 +00:00
|
|
|
property alias options: options
|
|
|
|
|
|
|
|
property alias logoImageData: logoPicker.imageData
|
|
|
|
property alias logoImagePath: logoPicker.source
|
|
|
|
property alias logoCropRect: logoPicker.cropRect
|
|
|
|
property alias bannerImageData: bannerPicker.imageData
|
|
|
|
property alias bannerPath: bannerPicker.source
|
|
|
|
property alias bannerCropRect: bannerPicker.cropRect
|
2022-03-23 15:38:23 +00:00
|
|
|
|
|
|
|
contentWidth: layout.width
|
|
|
|
contentHeight: layout.height
|
|
|
|
clip: true
|
|
|
|
interactive: contentHeight > height
|
|
|
|
flickableDirection: Flickable.VerticalFlick
|
|
|
|
|
2022-06-02 17:48:10 +00:00
|
|
|
implicitWidth: layout.implicitWidth
|
|
|
|
implicitHeight: layout.implicitHeight
|
2022-05-26 15:46:02 +00:00
|
|
|
|
2022-03-23 15:38:23 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: layout
|
|
|
|
|
|
|
|
width: root.width
|
|
|
|
spacing: 12
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityNameInput {
|
2022-03-23 15:38:23 +00:00
|
|
|
id: nameInput
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Component.onCompleted: nameInput.input.forceActiveFocus(Qt.MouseFocusReason)
|
|
|
|
}
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityDescriptionInput {
|
2022-03-23 15:38:23 +00:00
|
|
|
id: descriptionTextInput
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityLogoPicker {
|
|
|
|
id: logoPicker
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2022-05-23 18:53:51 +00:00
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityBannerPicker {
|
|
|
|
id: bannerPicker
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2022-05-23 18:53:51 +00:00
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityColorPicker {
|
|
|
|
id: colorPicker
|
2022-06-16 09:41:21 +00:00
|
|
|
onPick: Global.openPopup(pickColorComponent)
|
2022-05-26 15:46:02 +00:00
|
|
|
Layout.fillWidth: true
|
2022-06-16 09:41:21 +00:00
|
|
|
|
|
|
|
Component {
|
|
|
|
id: pickColorComponent
|
|
|
|
|
|
|
|
StatusStackModal {
|
|
|
|
replaceItem: CommunityColorPanel {
|
|
|
|
Component.onCompleted: color = colorPicker.color
|
|
|
|
onAccepted: {
|
|
|
|
colorPicker.color = color;
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onClosed: destroy()
|
|
|
|
}
|
|
|
|
}
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
2022-05-23 18:53:51 +00:00
|
|
|
|
2022-06-09 14:59:54 +00:00
|
|
|
CommunityTagsPicker {
|
|
|
|
id: tagsPicker
|
2022-06-16 09:41:21 +00:00
|
|
|
onPick: Global.openPopup(pickTagsComponent)
|
2022-06-09 14:59:54 +00:00
|
|
|
Layout.fillWidth: true
|
2022-06-16 09:41:21 +00:00
|
|
|
|
|
|
|
Component {
|
|
|
|
id: pickTagsComponent
|
|
|
|
|
|
|
|
StatusStackModal {
|
|
|
|
replaceItem: CommunityTagsPanel {
|
|
|
|
Component.onCompleted: {
|
|
|
|
tags = tagsPicker.tags;
|
|
|
|
selectedTags = tagsPicker.selectedTags;
|
|
|
|
}
|
|
|
|
onAccepted: {
|
|
|
|
tagsPicker.selectedTags = selectedTags;
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onClosed: destroy()
|
|
|
|
}
|
|
|
|
}
|
2022-06-09 14:59:54 +00:00
|
|
|
}
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
StatusModalDivider {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.bottomMargin: -layout.spacing
|
|
|
|
}
|
2022-05-23 18:53:51 +00:00
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityOptions {
|
|
|
|
id: options
|
2022-03-23 15:38:23 +00:00
|
|
|
}
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
StatusModalDivider {
|
2022-03-23 15:38:23 +00:00
|
|
|
Layout.fillWidth: true
|
2022-05-26 15:46:02 +00:00
|
|
|
Layout.topMargin: -layout.spacing
|
|
|
|
Layout.bottomMargin: 8
|
2022-03-23 15:38:23 +00:00
|
|
|
}
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityIntroMessageInput {
|
|
|
|
id: introMessageTextInput
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
2022-05-04 13:08:04 +00:00
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
CommunityOutroMessageInput {
|
|
|
|
id: outroMessageTextInput
|
2022-04-13 20:54:17 +00:00
|
|
|
Layout.fillWidth: true
|
2022-05-04 13:08:04 +00:00
|
|
|
}
|
|
|
|
|
2022-03-23 15:38:23 +00:00
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|