2023-06-29 21:52:16 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2022-03-23 15:38:23 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2022-05-18 12:21:03 +00:00
|
|
|
import StatusQ.Popups 0.1
|
2022-03-23 15:38:23 +00:00
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.controls 1.0
|
2022-06-16 09:41:21 +00:00
|
|
|
|
2022-07-13 12:29:38 +00:00
|
|
|
StatusScrollView {
|
2022-03-23 15:38:23 +00:00
|
|
|
id: root
|
2022-08-03 20:16:43 +00:00
|
|
|
objectName: "communityEditPanelScrollView"
|
2022-03-23 15:38:23 +00:00
|
|
|
|
2023-06-29 21:52:16 +00:00
|
|
|
property alias name: baseLayout.name
|
|
|
|
property alias description: baseLayout.description
|
2022-05-26 15:46:02 +00:00
|
|
|
property alias introMessage: introMessageTextInput.text
|
|
|
|
property alias outroMessage: outroMessageTextInput.text
|
2023-06-29 21:52:16 +00:00
|
|
|
property alias color: baseLayout.color
|
|
|
|
property alias tags: baseLayout.tags
|
|
|
|
property alias selectedTags: baseLayout.selectedTags
|
|
|
|
property alias options: baseLayout.options
|
|
|
|
|
|
|
|
property alias logoImageData: baseLayout.logoImageData
|
|
|
|
property alias logoImagePath: baseLayout.logoImagePath
|
|
|
|
property alias logoCropRect: baseLayout.logoCropRect
|
|
|
|
property alias bannerImageData: baseLayout.bannerImageData
|
|
|
|
property alias bannerPath: baseLayout.bannerPath
|
|
|
|
property alias bannerCropRect: baseLayout.bannerCropRect
|
2022-03-23 15:38:23 +00:00
|
|
|
|
2022-06-22 12:16:21 +00:00
|
|
|
property size bottomReservedSpace: Qt.size(0, 0)
|
|
|
|
property bool bottomReservedSpaceActive: false
|
|
|
|
|
2023-06-29 21:52:16 +00:00
|
|
|
readonly property bool saveChangesButtonEnabled: !((baseLayout.isNameDirty && !baseLayout.isNameValid) ||
|
|
|
|
(baseLayout.isDescriptionDirty && !baseLayout.isDescriptionValid) ||
|
|
|
|
(introMessageTextInput.input.dirty && !introMessageTextInput.valid) ||
|
|
|
|
(outroMessageTextInput.input.dirty && !outroMessageTextInput.valid))
|
2022-06-22 12:16:21 +00:00
|
|
|
|
2023-06-29 21:52:16 +00:00
|
|
|
padding: 0
|
2022-03-23 15:38:23 +00:00
|
|
|
ColumnLayout {
|
2023-06-29 21:52:16 +00:00
|
|
|
id: mainLayout
|
|
|
|
width: baseLayout.width
|
|
|
|
spacing: 16
|
|
|
|
EditCommunitySettingsForm {
|
|
|
|
id: baseLayout
|
|
|
|
Layout.fillHeight: true
|
2022-03-23 15:38:23 +00:00
|
|
|
}
|
2022-05-26 15:46:02 +00:00
|
|
|
StatusModalDivider {
|
|
|
|
Layout.fillWidth: true
|
2023-06-29 21:52:16 +00:00
|
|
|
Layout.topMargin: -baseLayout.spacing
|
|
|
|
Layout.bottomMargin: 2
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
2023-06-26 11:48:45 +00:00
|
|
|
IntroMessageInput {
|
2022-05-26 15:46:02 +00:00
|
|
|
id: introMessageTextInput
|
2022-08-03 20:16:43 +00:00
|
|
|
input.edit.objectName: "editCommunityIntroInput"
|
2022-05-26 15:46:02 +00:00
|
|
|
Layout.fillWidth: true
|
2023-06-29 21:52:16 +00:00
|
|
|
minimumHeight: 482
|
|
|
|
maximumHeight: 482
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
2022-05-04 13:08:04 +00:00
|
|
|
|
2023-06-26 11:48:45 +00:00
|
|
|
OutroMessageInput {
|
2022-05-26 15:46:02 +00:00
|
|
|
id: outroMessageTextInput
|
2022-08-03 20:16:43 +00:00
|
|
|
input.edit.objectName: "editCommunityOutroInput"
|
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 {
|
2022-06-22 12:16:21 +00:00
|
|
|
// settingsDirtyToastMessage placeholder
|
|
|
|
visible: root.bottomReservedSpaceActive
|
|
|
|
implicitWidth: root.bottomReservedSpace.width
|
|
|
|
implicitHeight: root.bottomReservedSpace.height
|
2022-03-23 15:38:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|