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>
|
{{gh-count-down-characters this.scratchMember.note 500}}</p>
|
||||||
</GhFormGroup>
|
</GhFormGroup>
|
||||||
|
|
||||||
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
|
||||||
<div class="flex justify-between items-center">
|
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
||||||
<div>
|
<div class="flex justify-between items-center">
|
||||||
<h4 class="gh-setting-title m">Subscribed to newsletter</h4>
|
<div>
|
||||||
<p class="gh-setting-desc">If disabled, member will <em>not</em> receive newsletter emails</p>
|
<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>
|
||||||
<div class="for-switch">
|
</GhFormGroup>
|
||||||
<label class="switch" for="subscribed-checkbox">
|
{{/if}}
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</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')) {
|
if (this.feature.get('multipleProducts')) {
|
||||||
// fetch all products w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
// fetch all products w̶i̶t̶h̶ c̶o̶u̶n̶t̶s̶
|
||||||
// TODO: add `include: 'count.members` to query once API supports
|
// 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;
|
this._options = options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ export default class SettingsDefaultEmailRecipientsComponent extends Component {
|
|||||||
icon: 'members-paid',
|
icon: 'members-paid',
|
||||||
icon_color: 'pink'
|
icon_color: 'pink'
|
||||||
}, {
|
}, {
|
||||||
name: 'Specific tier(s)',
|
name: 'Specific people',
|
||||||
description: 'Only people who have a subscription to a selected tier',
|
description: 'Only people with any of the selected tiers or labels',
|
||||||
value: 'segment',
|
value: 'segment',
|
||||||
icon: 'members-segment',
|
icon: 'members-segment',
|
||||||
icon_color: 'yellow'
|
icon_color: 'yellow'
|
||||||
|
Loading…
Reference in New Issue
Block a user