mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Added option to hide default segments for segment select component
refs https://github.com/TryGhost/Team/issues/822 The post access dropdown in the Post settings menu and default access settings should not show the default segments as we only allow segmenting on specific products.
This commit is contained in:
parent
450ad78f61
commit
71120d6855
@ -59,15 +59,19 @@ export default class GhMembersSegmentSelect extends Component {
|
|||||||
|
|
||||||
@task
|
@task
|
||||||
*fetchOptionsTask() {
|
*fetchOptionsTask() {
|
||||||
const options = yield [{
|
const options = yield [];
|
||||||
name: 'Free members',
|
|
||||||
segment: 'status:free',
|
if (!this.args.hideDefaultSegments) {
|
||||||
class: 'segment-status-free'
|
options.push({
|
||||||
}, {
|
name: 'Free members',
|
||||||
name: 'Paid members',
|
segment: 'status:free',
|
||||||
segment: 'status:-free', // paid & comped
|
class: 'segment-status-free'
|
||||||
class: 'segment-status-paid'
|
}, {
|
||||||
}];
|
name: 'Paid members',
|
||||||
|
segment: 'status:-free', // paid & comped
|
||||||
|
class: 'segment-status-paid'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// fetch all labels w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
// fetch all labels w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||||
// TODO: add `include: 'count.members` to query once API is fixed
|
// TODO: add `include: 'count.members` to query once API is fixed
|
||||||
|
Loading…
Reference in New Issue
Block a user