diff --git a/ghost/admin/app/components/editor-labs/modals/publish-flow.hbs b/ghost/admin/app/components/editor-labs/modals/publish-flow.hbs index 61f2ad9b0a..1fe434e470 100644 --- a/ghost/admin/app/components/editor-labs/modals/publish-flow.hbs +++ b/ghost/admin/app/components/editor-labs/modals/publish-flow.hbs @@ -9,6 +9,7 @@ {{#if this.isConfirming}} diff --git a/ghost/admin/app/components/editor-labs/modals/publish-flow.js b/ghost/admin/app/components/editor-labs/modals/publish-flow.js index 8c44bce096..cf47b1acc6 100644 --- a/ghost/admin/app/components/editor-labs/modals/publish-flow.js +++ b/ghost/admin/app/components/editor-labs/modals/publish-flow.js @@ -13,6 +13,28 @@ export default class PublishModalComponent extends Component { @tracked isConfirming = false; @tracked isComplete = false; + get recipientType() { + const filter = this.args.data.publishOptions.recipientFilter; + + if (!filter) { + return 'none'; + } + + if (filter === 'status:free') { + return 'free'; + } + + if (filter === 'status:-free') { + return 'paid'; + } + + if (filter.includes('status:free') && filter.includes('status:-free')) { + return 'all'; + } + + return 'specific'; + } + @action toggleConfirm() { // TODO: validate? diff --git a/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.hbs b/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.hbs index 39a0eb0443..23b7ce4b17 100644 --- a/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.hbs +++ b/ghost/admin/app/components/editor-labs/modals/publish-flow/confirm.hbs @@ -21,7 +21,21 @@ will be delivered to {{#let (members-count-fetcher query=(hash filter=@publishOptions.fullRecipientFilter)) as |countFetcher|}} - {{pluralize countFetcher.count "member"}} + + {{if (eq @recipientType "all") "all"}} + + {{countFetcher.count}} + + {{!-- @recipientType = none/free/paid/all/specific --}} + {{if (not-eq @recipientType "all") @recipientType}} + + + {{#if @publishOptions.onlyDefaultNewsletter}} + {{gh-pluralize countFetcher.count "member" without-count=true}} + {{else}} + {{gh-pluralize countFetcher.count "subscriber" without-count=true}} + of {{@publishOptions.newsletter.name}} + {{/if}} {{/let}} {{#if @publishOptions.willPublish}} @@ -47,7 +61,7 @@ @class="gh-btn gh-btn-gradient gh-btn-large" />
- Or - + Or +
\ No newline at end of file diff --git a/ghost/admin/app/components/editor-labs/modals/publish-flow/options.hbs b/ghost/admin/app/components/editor-labs/modals/publish-flow/options.hbs index e2aa0fe766..f580b58d33 100644 --- a/ghost/admin/app/components/editor-labs/modals/publish-flow/options.hbs +++ b/ghost/admin/app/components/editor-labs/modals/publish-flow/options.hbs @@ -32,12 +32,20 @@ {{svg-jar "member"}}
{{#let (members-count-fetcher query=(hash filter=@publishOptions.fullRecipientFilter)) as |countFetcher|}} + {{if (eq @recipientType "all") "All"}} + {{countFetcher.count}} + + {{!-- @recipientType = none/free/paid/all/specific --}} + {{if (not-eq @recipientType "all") @recipientType}} + + {{#if @publishOptions.onlyDefaultNewsletter}} + {{gh-pluralize countFetcher.count "member" without-count=true}} + {{else}} + {{gh-pluralize countFetcher.count "subscriber" without-count=true}} + of {{@publishOptions.newsletter.name}} + {{/if}} {{/let}} - {{#unless @publishOptions.onlyDefaultNewsletter}} - {{@publishOptions.newsletter.name}} - {{/unless}} - subscribers
{{svg-jar "arrow-down" class="icon-expand"}} @@ -99,7 +107,7 @@
- Or + Or
\ No newline at end of file