UX: indicate main sidebar section is always public (#22492)

This commit is contained in:
Kris 2023-07-10 11:44:40 -04:00 committed by GitHub
parent d52b0560ff
commit 26d19fc1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 4 deletions

View File

@ -73,15 +73,22 @@
/>
{{/if}}
{{#if
(and this.currentUser.staff (not this.transformedModel.sectionType))
}}
<div class="row-wrapper mark-public-wrapper">
{{#if (and this.currentUser.staff)}}
<div
class="row-wrapper mark-public-wrapper
{{if this.transformedModel.sectionType '-disabled'}}"
>
<label class="checkbox-label">
{{#if this.transformedModel.sectionType}}
<DTooltip @placement="top-start">
{{i18n "sidebar.sections.custom.always_public"}}
</DTooltip>
{{/if}}
<Input
@type="checkbox"
@checked={{this.transformedModel.public}}
class="mark-public"
disabled={{this.transformedModel.sectionType}}
/>
{{i18n "sidebar.sections.custom.public"}}
</label>

View File

@ -190,6 +190,11 @@
grid-column: 2;
}
&.mark-public-wrapper {
margin-top: 1em;
padding-bottom: 0;
&.-disabled label {
cursor: not-allowed;
}
label {
grid-column: 1 / -1;
}

View File

@ -4415,6 +4415,7 @@ en:
delete_confirm: "Are you sure you want to delete this section?"
reset_confirm: "Are you sure you want to reset this section to default?"
public: "Make this section public and visible to everyone"
always_public: "Content in this section is always public"
more_menu: "More menu"
links:
add: "Add another link"