mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
495e435daf
no issue Free and Paid are by far the two most common options for email recipients so it makes more sense to have them as very clear options which we felt was not the case with the single token/segment select. - created a new `<GhMembersRecipientSelect>` component that has individual checkboxes for free/paid/segment and when segment is selected an additional token input for specific labels - updated draft and scheduled publish menu components to use the `<GhMembersRecipientSelect>` Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
16 lines
317 B
JavaScript
16 lines
317 B
JavaScript
export default function flattenGroupedOptions(options) {
|
|
const flatOptions = [];
|
|
|
|
function getOptions(option) {
|
|
if (option.options) {
|
|
return option.options.forEach(getOptions);
|
|
}
|
|
|
|
flatOptions.push(option);
|
|
}
|
|
|
|
options.forEach(getOptions);
|
|
|
|
return flatOptions;
|
|
}
|