2022-05-26 15:46:02 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
ColumnLayout {
|
2022-05-26 15:46:02 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
property alias archiveSupportEnabled: archiveSupportToggle.checked
|
|
|
|
property alias requestToJoinEnabled: requestToJoinToggle.checked
|
|
|
|
property alias pinMessagesEnabled: pinMessagesToggle.checked
|
|
|
|
|
2023-07-21 21:05:42 +00:00
|
|
|
property alias archiveSupporVisible: archiveSupport.visible
|
|
|
|
|
2022-05-26 15:46:02 +00:00
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
2022-08-03 00:07:27 +00:00
|
|
|
readonly property int optionHeight: 64
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
Item {
|
2022-05-26 15:46:02 +00:00
|
|
|
id: archiveSupport
|
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.preferredHeight: visible ? d.optionHeight : 0
|
2022-05-26 15:46:02 +00:00
|
|
|
|
|
|
|
StatusCheckBox {
|
|
|
|
id: archiveSupportToggle
|
2024-02-15 10:44:45 +00:00
|
|
|
width: (parent.width-12)
|
|
|
|
leftSide: false
|
|
|
|
padding: 0
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
text: qsTr("Community history service")
|
2024-04-29 20:37:22 +00:00
|
|
|
|
|
|
|
StatusToolTip {
|
|
|
|
text: qsTr('For this Community Setting to work, you also need to activate "Archive Protocol Enabled" in Advanced Settings')
|
2024-10-08 20:22:22 +00:00
|
|
|
visible: parent.hovered
|
2024-04-29 20:37:22 +00:00
|
|
|
}
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
Item {
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.preferredHeight: d.optionHeight
|
2022-05-26 15:46:02 +00:00
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
StatusCheckBox {
|
|
|
|
id: pinMessagesToggle
|
|
|
|
width: (parent.width-12)
|
|
|
|
leftSide: false
|
|
|
|
padding: 0
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
text: qsTr("Any member can pin a message")
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
2024-02-15 10:44:45 +00:00
|
|
|
}
|
2022-05-26 15:46:02 +00:00
|
|
|
|
2024-02-15 10:44:45 +00:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.topMargin: 22
|
2024-10-08 20:22:22 +00:00
|
|
|
spacing: 4
|
2022-05-26 15:46:02 +00:00
|
|
|
StatusCheckBox {
|
|
|
|
id: requestToJoinToggle
|
2024-02-15 10:44:45 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: 22
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
Layout.rightMargin: 12
|
|
|
|
text: qsTr("Request to join required")
|
|
|
|
leftSide: false
|
|
|
|
padding: 0
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
Layout.fillWidth: true
|
2024-10-08 20:22:22 +00:00
|
|
|
Layout.rightMargin: 64
|
2024-02-15 10:44:45 +00:00
|
|
|
visible: requestToJoinToggle.checked
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
text: qsTr("Warning: Only token gated communities (or token gated channels inside non-token gated community) are encrypted")
|
|
|
|
font.pixelSize: Theme.tertiaryTextFontSize
|
|
|
|
color: Theme.palette.warningColor1
|
2022-05-26 15:46:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|