Added option to hide labels for post acces

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

- makes labels option in members segment select
- hides label options in segment select for post access
This commit is contained in:
Rishabh 2021-06-28 15:37:33 +05:30 committed by Rishabh Garg
parent c97be22854
commit 59367d418b
3 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,7 @@ export default class GhMembersSegmentSelect extends Component {
// TODO: add `include: 'count.members` to query once API is fixed
const labels = yield this.store.query('label', {limit: 'all'});
if (labels.length > 0) {
if (labels.length > 0 && !this.args.hideLabels) {
const labelsGroup = {
groupName: 'Labels',
options: []

View File

@ -101,6 +101,7 @@
<div class="gh-radio-label">Members-only</div>
<div class="gh-radio-desc">
<GhMembersSegmentSelect
@hideLabels={{true}}
@segment={{this.post.visibilitySegment}}
@onChange={{action "setVisibility"}}
@renderInPlace={{true}}

View File

@ -100,6 +100,7 @@
<div class="gh-radio-label">Members-only</div>
<div class="gh-radio-desc">
<GhMembersSegmentSelect
@hideLabels={{true}}
@segment={{this.post.visibilitySegment}}
@onChange={{action "setVisibility"}}
@renderInPlace={{true}}