From af0338b5049d972c8a4108ae794837c5c43de862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20der=20Winden?= Date: Tue, 27 Aug 2024 17:22:11 +0200 Subject: [PATCH] Rewrote the publish modal logic and layout (#20832) Removed unnecessary code, rewrote it in places where we were repeating ourselves, and followed the new layout for posts + emails. --- .../app/components/modal-post-success.hbs | 146 +++++++++--------- 1 file changed, 72 insertions(+), 74 deletions(-) diff --git a/ghost/admin/app/components/modal-post-success.hbs b/ghost/admin/app/components/modal-post-success.hbs index 5b9456abf1..44e9d6dc88 100644 --- a/ghost/admin/app/components/modal-post-success.hbs +++ b/ghost/admin/app/components/modal-post-success.hbs @@ -5,22 +5,16 @@ All set! {{else}} - {{#if this.showPostCount}} - Boom! It's out there. - {{else}} - Your post is published. - {{/if}} + {{if this.showPostCount "Boom! It's out there." "Your post is published."}} {{#if this.post.isPost}} {{#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. {{else}} - {{#if this.showPostCount}} - That's {{format-number this.postCount}} {{gh-pluralize this.postCount "post" without-count=true}} published. - {{else}} - Spread the word! - {{/if}} + Spread the word! {{/if}} {{else}} Your page is published. @@ -30,54 +24,68 @@ - {{#if (and this.post.isPublished (not this.post.emailOnly))}} - {{else}} - + {{/if}} {{#if this.post.emailOnly}} -