mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Updated Email newsletter settings
No issue - When disabling email newsletters, the "Subscribed to email" toggle in the member profile is hidden - Copy changes to the Default newsletter recipients setting - Moved tiers to the top of the segment selection in Default newsletter recipients
This commit is contained in:
parent
d3447315ee
commit
7a7b473f89
@ -43,21 +43,23 @@
|
||||
{{gh-count-down-characters this.scratchMember.note 500}}</p>
|
||||
</GhFormGroup>
|
||||
|
||||
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h4 class="gh-setting-title m">Subscribed to newsletter</h4>
|
||||
<p class="gh-setting-desc">If disabled, member will <em>not</em> receive newsletter emails</p>
|
||||
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
|
||||
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<h4 class="gh-setting-title m">Subscribed to newsletter</h4>
|
||||
<p class="gh-setting-desc">If disabled, member will <em>not</em> receive newsletter emails</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<label class="switch" for="subscribed-checkbox">
|
||||
<Input @checked={{this.member.subscribed}} @type="checkbox" @id="subscribed-checkbox"
|
||||
@name="subscribed" data-test-checkbox="member-subscribed" />
|
||||
<span class="input-toggle-component"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<label class="switch" for="subscribed-checkbox">
|
||||
<Input @checked={{this.member.subscribed}} @type="checkbox" @id="subscribed-checkbox"
|
||||
@name="subscribed" data-test-checkbox="member-subscribed" />
|
||||
<span class="input-toggle-component"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</GhFormGroup>
|
||||
</GhFormGroup>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -73,27 +73,6 @@ export default class GhMembersSegmentSelect extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
// fetch all labels w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||
// TODO: add `include: 'count.members` to query once API is fixed
|
||||
const labels = yield this.store.query('label', {limit: 'all'});
|
||||
|
||||
if (labels.length > 0 && !this.args.hideLabels) {
|
||||
const labelsGroup = {
|
||||
groupName: 'Labels',
|
||||
options: []
|
||||
};
|
||||
|
||||
labels.forEach((label) => {
|
||||
labelsGroup.options.push({
|
||||
name: label.name,
|
||||
segment: `label:${label.slug}`,
|
||||
count: label.count?.members,
|
||||
class: 'segment-label'
|
||||
});
|
||||
});
|
||||
|
||||
options.push(labelsGroup);
|
||||
}
|
||||
if (this.feature.get('multipleProducts')) {
|
||||
// fetch all products w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||
// TODO: add `include: 'count.members` to query once API supports
|
||||
@ -121,6 +100,28 @@ export default class GhMembersSegmentSelect extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
// fetch all labels w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||
// TODO: add `include: 'count.members` to query once API is fixed
|
||||
const labels = yield this.store.query('label', {limit: 'all'});
|
||||
|
||||
if (labels.length > 0 && !this.args.hideLabels) {
|
||||
const labelsGroup = {
|
||||
groupName: 'Labels',
|
||||
options: []
|
||||
};
|
||||
|
||||
labels.forEach((label) => {
|
||||
labelsGroup.options.push({
|
||||
name: label.name,
|
||||
segment: `label:${label.slug}`,
|
||||
count: label.count?.members,
|
||||
class: 'segment-label'
|
||||
});
|
||||
});
|
||||
|
||||
options.push(labelsGroup);
|
||||
}
|
||||
|
||||
this._options = options;
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ export default class SettingsDefaultEmailRecipientsComponent extends Component {
|
||||
icon: 'members-paid',
|
||||
icon_color: 'pink'
|
||||
}, {
|
||||
name: 'Specific tier(s)',
|
||||
description: 'Only people who have a subscription to a selected tier',
|
||||
name: 'Specific people',
|
||||
description: 'Only people with any of the selected tiers or labels',
|
||||
value: 'segment',
|
||||
icon: 'members-segment',
|
||||
icon_color: 'yellow'
|
||||
|
Loading…
Reference in New Issue
Block a user