UX: move global option to sidebar modal footer, shorten translation (#24024)

This commit is contained in:
Kris 2023-10-19 12:20:03 -04:00 committed by GitHub
parent cfbe16f9cc
commit 7b6e32c238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 41 deletions

View File

@ -82,34 +82,8 @@
class="btn-flat btn-text add-link"
/>
{{/if}}
{{#if (and this.currentUser.admin)}}
<div
class="row-wrapper mark-public-wrapper
{{if this.transformedModel.sectionType '-disabled'}}"
>
<label class="checkbox-label">
{{#if this.transformedModel.sectionType}}
<DTooltip
@icon="check-square"
@content={{i18n "sidebar.sections.custom.always_public"}}
class="always-public-tooltip"
/>
{{else}}
<Input
@type="checkbox"
@checked={{this.transformedModel.public}}
class="mark-public"
disabled={{this.transformedModel.sectionType}}
/>
{{/if}}
<span>{{i18n "sidebar.sections.custom.public"}}</span>
</label>
</div>
{{/if}}
</form>
</:body>
<:footer>
<DButton
@action={{this.save}}
@ -119,6 +93,30 @@
id="save-section"
class="btn-primary"
/>
{{#if (and this.currentUser.admin)}}
<div
class="mark-public-wrapper
{{if this.transformedModel.sectionType '-disabled'}}"
>
<label class="checkbox-label">
{{#if this.transformedModel.sectionType}}
<DTooltip
@icon="check-square"
@content={{i18n "sidebar.sections.custom.always_public"}}
class="always-public-tooltip"
/>
{{else}}
<Input
@type="checkbox"
@checked={{this.transformedModel.public}}
class="mark-public"
disabled={{this.transformedModel.sectionType}}
/>
{{/if}}
<span>{{i18n "sidebar.sections.custom.public"}}</span>
</label>
</div>
{{/if}}
{{#if this.canDelete}}
<DButton
@icon="trash-alt"

View File

@ -200,16 +200,7 @@
.link-icon {
grid-column: 2;
}
&.mark-public-wrapper {
margin-top: 1em;
padding-bottom: 0;
&.-disabled label {
cursor: not-allowed;
}
label {
grid-column: 1 / -1;
}
}
.input-group {
margin: 0 0.5em;
@include breakpoint(mobile-large) {
@ -239,11 +230,32 @@
}
}
.modal-footer {
display: flex;
justify-content: space-between;
display: grid;
grid-template-columns: auto 1fr auto;
gap: 0.5em;
@include breakpoint(mobile-extra-large) {
grid-template-columns: auto 1fr;
justify-items: left;
.mark-public-wrapper {
grid-row: 1;
grid-column: 1 / span 2;
}
.checkbox-label {
padding: 0 0 0.5em 0;
}
}
.reset-link,
.delete {
margin-right: 0;
margin: 0;
justify-self: right;
}
.mark-public-wrapper {
&.-disabled label {
cursor: not-allowed;
}
.checkbox-label {
margin: 0;
}
}
}
.select-kit.multi-select .multi-select-header .formatted-selection {

View File

@ -4493,7 +4493,7 @@ en:
delete: "Delete"
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"
public: "Visible to everyone"
always_public: "Content in this section is always public"
more_menu: "More menu"
links: