0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed announcement bar filtering for disabled members

refs https://github.com/TryGhost/Team/issues/3112

- When members features are disabled on the site, there is no point to show member-specific filters for the announcement bar. The only option available should be to show or not to show the announcement.
This commit is contained in:
Naz 2023-04-26 15:39:25 +02:00
parent e541ea8746
commit 4cd2688c25
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

View file

@ -16,9 +16,14 @@
{{on "click" this.updateVisibility}}
>
<span class="input-toggle-component"></span>
{{#if this.isMembersEnabled}}
<span>Logged out visitors</span>
{{else}}
<span>Show the announcement</span>
{{/if}}
</label>
{{#if this.isMembersEnabled}}
{{#if this.isPaidAvailable}}
<label class="checkbox" for="free">
<input
@ -60,6 +65,7 @@
<span>Members</span>
</label>
{{/if}}
{{/if}}
</div>
</div>
</div>

View file

@ -32,6 +32,10 @@ export default class AnnouncementSettingsVisibilityComponent extends Component {
return this.visibilitySettings.includes(this.visibilityOptions.visitors);
}
get isMembersEnabled() {
return this.settings.membersEnabled;
}
@action
updateVisibility(event) {
let updatedVisibilityOptions = [...this.visibilitySettings];