diff --git a/ghost/admin/app/components/editor/modals/publish-flow/confirm.js b/ghost/admin/app/components/editor/modals/publish-flow/confirm.js index 5950b1b949..405e1c197a 100644 --- a/ghost/admin/app/components/editor/modals/publish-flow/confirm.js +++ b/ghost/admin/app/components/editor/modals/publish-flow/confirm.js @@ -95,14 +95,28 @@ export default class PublishFlowOptions extends Component { yield this.args.saveTask.perform(); if (this.feature.publishFlowEndScreen) { if (this.args.publishOptions.isScheduled) { - localStorage.setItem('ghost-last-scheduled-post', this.args.publishOptions.post.id); - this.router.transitionTo('posts'); - } else { - localStorage.setItem('ghost-last-published-post', this.args.publishOptions.post.id); - if (this.args.publishOptions.post.emailOnly) { - this.router.transitionTo('posts.analytics', this.args.publishOptions.post.id); - } else { + localStorage.setItem('ghost-last-scheduled-post', JSON.stringify({ + id: this.args.publishOptions.post.id, + type: this.args.publishOptions.post.displayName + })); + if (this.args.publishOptions.post.displayName !== 'page') { this.router.transitionTo('posts'); + } else { + this.router.transitionTo('pages'); + } + } else { + localStorage.setItem('ghost-last-published-post', JSON.stringify({ + id: this.args.publishOptions.post.id, + type: this.args.publishOptions.post.displayName + })); + if (this.args.publishOptions.post.displayName !== 'page') { + if (this.args.publishOptions.post.hasEmail) { + this.router.transitionTo('posts.analytics', this.args.publishOptions.post.id); + } else { + this.router.transitionTo('posts'); + } + } else { + this.router.transitionTo('pages'); } } } diff --git a/ghost/admin/app/components/modal-post-success.hbs b/ghost/admin/app/components/modal-post-success.hbs index 75ba245fbc..049d9395ff 100644 --- a/ghost/admin/app/components/modal-post-success.hbs +++ b/ghost/admin/app/components/modal-post-success.hbs @@ -12,14 +12,18 @@ {{/if}} - {{#if this.post.emailOnly}} - Your email has been sent. - {{else}} - {{#if this.showPostCount}} - That's {{format-number this.postCount}} {{gh-pluralize this.postCount "post" without-count=true}} published. + {{#if this.post.isPost}} + {{#if this.post.emailOnly}} + Your email has been sent. {{else}} - Spread the word! + {{#if this.showPostCount}} + That's {{format-number this.postCount}} {{gh-pluralize this.postCount "post" without-count=true}} published. + {{else}} + Spread the word! + {{/if}} {{/if}} + {{else}} + Your page is published. {{/if}} {{/if}} @@ -32,7 +36,11 @@ {{#if this.post.isSent}} It {{else}} - {{if this.post.emailOnly "Your email" "Your post"}} + {{#if this.post.emailOnly}} + Your email + {{else}} + Your {{this.post.displayName}} + {{/if}} {{/if}} {{if this.post.isScheduled "will be" "was"}} {{#if this.post.emailOnly}} @@ -105,7 +113,7 @@ {{#if this.post.excerpt}}
{{this.post.excerpt}}
{{/if}} - +