chore(CommunityNewPermissionView): exclude subcomponent HidePermissionPanel

This commit is contained in:
Michał Cieślak 2023-02-08 18:13:25 +01:00 committed by Michał
parent f8f4757a0b
commit 3a3d1657f0
4 changed files with 66 additions and 35 deletions

View File

@ -19,7 +19,7 @@ SplitView {
height: conflictPanel.implicitHeight
anchors.centerIn: parent
PermissionConflictWarningPanel{
PermissionConflictWarningPanel {
id: conflictPanel
anchors.left: parent.left
anchors.right: parent.right

View File

@ -0,0 +1,53 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import StatusQ.Core 0.1
import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Core.Theme 0.1
import utils 1.0
Control {
id: root
property alias checked: switchItem.checked
signal toggled
contentItem: RowLayout {
spacing: Style.current.padding
StatusRoundIcon {
asset.name: "hide"
}
ColumnLayout {
Layout.fillWidth: true
StatusBaseText {
text: qsTr("Hide permission")
color: Theme.palette.directColor1
font.pixelSize: Style.current.primaryTextFontSize
}
StatusBaseText {
Layout.fillWidth: true
Layout.fillHeight: true
text: qsTr("Make this permission hidden from members who dont meet its requirements")
color: Theme.palette.baseColor1
font.pixelSize: Style.current.primaryTextFontSize
lineHeight: 1.2
wrapMode: Text.WordWrap
elide: Text.ElideRight
}
}
StatusSwitch {
id: switchItem
onToggled: root.toggled()
}
}
}

View File

@ -1,8 +1,9 @@
CommunityColumnHeaderPanel 1.0 CommunityColumnHeaderPanel.qml
CommunityMintTokensSettingsPanel 1.0 CommunityMintTokensSettingsPanel.qml
CommunityPermissionsSettingsPanel 1.0 CommunityPermissionsSettingsPanel.qml
CommunityProfilePopupInviteFriendsPanel 1.0 CommunityProfilePopupInviteFriendsPanel.qml
CommunityProfilePopupInviteMessagePanel 1.0 CommunityProfilePopupInviteMessagePanel.qml
PermissionQualificationPanel 1.0 PermissionQualificationPanel.qml
PermissionConflictWarningPanel 1.0 PermissionConflictWarningPanel.qml
CommunityColumnHeaderPanel 1.0 CommunityColumnHeaderPanel.qml
HidePermissionPanel 1.0 HidePermissionPanel.qml
JoinPermissionsOverlayPanel 1.0 JoinPermissionsOverlayPanel.qml
CommunityMintTokensSettingsPanel 1.0 CommunityMintTokensSettingsPanel.qml
PermissionConflictWarningPanel 1.0 PermissionConflictWarningPanel.qml
PermissionQualificationPanel 1.0 PermissionQualificationPanel.qml

View File

@ -660,42 +660,19 @@ StatusScrollView {
Separator {
Layout.topMargin: 24
}
RowLayout {
HidePermissionPanel {
Layout.topMargin: 12
Layout.fillWidth: true
Layout.leftMargin: 16
Layout.rightMargin: Layout.leftMargin
spacing: 16
StatusRoundIcon {
asset.name: "hide"
}
ColumnLayout {
Layout.fillWidth: true
StatusBaseText {
text: qsTr("Hide permission")
color: Theme.palette.directColor1
font.pixelSize: 15
}
StatusBaseText {
Layout.fillWidth: true
Layout.fillHeight: true
text: qsTr("Make this permission hidden from members who dont meet its requirements")
color: Theme.palette.baseColor1
font.pixelSize: 15
lineHeight: 1.2
wrapMode: Text.WordWrap
elide: Text.ElideRight
clip: true
}
}
StatusSwitch {
enabled: d.permissionType !== PermissionTypes.Type.Admin
checked: d.dirtyValues.isPrivate
onToggled: d.dirtyValues.isPrivate = checked
}
enabled: d.permissionType !== PermissionTypes.Type.Admin
checked: d.dirtyValues.isPrivate
onToggled: d.dirtyValues.isPrivate = checked
}
PermissionConflictWarningPanel{
PermissionConflictWarningPanel {
id: conflictPanel
visible: store.permissionConflict.exists