diff --git a/ghost/admin/app/components/modal-publish-flow.hbs b/ghost/admin/app/components/modal-publish-flow.hbs index dda99f1ce5..bb27faac87 100644 --- a/ghost/admin/app/components/modal-publish-flow.hbs +++ b/ghost/admin/app/components/modal-publish-flow.hbs @@ -12,7 +12,11 @@ {{#if this.post.emailOnly}} Your email has been sent. {{else}} - That's {{format-number this.postCount}} {{gh-pluralize this.postCount "post" without-count=true}} published. + {{#if this.showPostCount}} + That's {{format-number this.postCount}} {{gh-pluralize this.postCount "post" without-count=true}} published. + {{else}} + Opened from the analytics + {{/if}} {{/if}} {{else}} diff --git a/ghost/admin/app/components/modal-publish-flow.js b/ghost/admin/app/components/modal-publish-flow.js index 39965b956f..67fe30e488 100644 --- a/ghost/admin/app/components/modal-publish-flow.js +++ b/ghost/admin/app/components/modal-publish-flow.js @@ -17,6 +17,10 @@ export default class ModalPublishFlow extends ModalComponent { return this.model.postCount; } + get showPostCount() { + return this.model.showPostCount; + } + @action handleTwitter() { window.open(`https://twitter.com/intent/tweet?url=${encodeURI(this.post.url)}`, '_blank'); diff --git a/ghost/admin/app/components/posts/analytics.hbs b/ghost/admin/app/components/posts/analytics.hbs index cf9e39fb9a..65bfb1b63a 100644 --- a/ghost/admin/app/components/posts/analytics.hbs +++ b/ghost/admin/app/components/posts/analytics.hbs @@ -38,9 +38,11 @@ - + {{#unless this.post.emailOnly}} + + {{/unless}} {{!-- {{svg-jar "pen" title="Edit post"}}Edit post --}} @@ -266,7 +268,9 @@ @model={{hash post=this.post postCount=this.postCount + showPostCount=this.showPostCount }} + @haha="haha" @close={{this.togglePublishFlowModal}} @modifier="action wide" /> {{/if}} \ No newline at end of file diff --git a/ghost/admin/app/components/posts/analytics.js b/ghost/admin/app/components/posts/analytics.js index b89777801b..4fa403c07e 100644 --- a/ghost/admin/app/components/posts/analytics.js +++ b/ghost/admin/app/components/posts/analytics.js @@ -35,6 +35,7 @@ export default class Analytics extends Component { @tracked _post = null; @tracked showPublishFlowModal = false; @tracked postCount = null; + @tracked showPostCount = false; displayOptions = DISPLAY_OPTIONS; constructor() { @@ -45,6 +46,7 @@ export default class Analytics extends Component { async checkPublishFlowModal() { if (localStorage.getItem('ghost-last-published-post')) { await this.fetchPostCountTask.perform(); + this.showPostCount = true; this.showPublishFlowModal = true; localStorage.removeItem('ghost-last-published-post'); } @@ -165,6 +167,7 @@ export default class Analytics extends Component { @action togglePublishFlowModal() { + this.showPostCount = false; this.showPublishFlowModal = !this.showPublishFlowModal; }