mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
63b1e4e8ad
no issue - in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable - switched to passing a component explicitly with `{{component}}` - https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
30 lines
1.4 KiB
Handlebars
30 lines
1.4 KiB
Handlebars
<div class="form-group max-width mb0">
|
|
<GhMembersRecipientSelect
|
|
@filter={{@publishOptions.recipientFilter}}
|
|
@newsletter={{@publishOptions.newsletter}}
|
|
@onChange={{@publishOptions.setRecipientFilter}}
|
|
@renderInPlace={{false}}
|
|
@dropdownClass="gh-publish-newsletter-dropdown"
|
|
/>
|
|
|
|
{{#if (gt @publishOptions.newsletters.length 1)}}
|
|
<div class="mt4" data-test-select="newsletter">
|
|
<label class="gh-main-section-header small bn">Newsletter</label>
|
|
<PowerSelect
|
|
@selected={{@publishOptions.newsletter}}
|
|
@options={{@publishOptions.newsletters}}
|
|
@onChange={{@publishOptions.setNewsletter}}
|
|
@triggerComponent={{component "gh-power-select/trigger"}}
|
|
@triggerClass="gh-publish-newsletter-trigger"
|
|
@dropdownClass="gh-publish-newsletter-dropdown"
|
|
as |newsletter|
|
|
>
|
|
<span data-test-select-option={{newsletter.name}}>{{newsletter.name}}</span>
|
|
{{!-- TODO: remove conditional when author/editor can fetch member counts --}}
|
|
{{#if @publishOptions.user.isAdmin}}
|
|
<span class="gh-newsletter-count">{{format-number newsletter.count.members}}</span>
|
|
{{/if}}
|
|
</PowerSelect>
|
|
</div>
|
|
{{/if}}
|
|
</div> |