From 245dbef9945b67c6402f0f8098950f8218262afb Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 1 Oct 2020 12:19:45 +0530 Subject: [PATCH] Allowed empty accent color in portal preview no issue - Current logic was not setting empty accent color in portal preview which was misleading when no accent color is set - Updated preview url to contain empty accent color which is picked by Portal preview --- ghost/admin/app/components/modal-portal-settings.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghost/admin/app/components/modal-portal-settings.js b/ghost/admin/app/components/modal-portal-settings.js index 69612ea239..86b3586e57 100644 --- a/ghost/admin/app/components/modal-portal-settings.js +++ b/ghost/admin/app/components/modal-portal-settings.js @@ -92,7 +92,7 @@ export default ModalComponent.extend({ settingsParam.append('buttonIcon', encodeURIComponent(this.buttonIcon)); } settingsParam.append('signupButtonText', encodeURIComponent(this.settings.get('portalButtonSignupText'))); - if (this.settings.get('accentColor')) { + if (this.settings.get('accentColor') === '' || this.settings.get('accentColor')) { settingsParam.append('accentColor', encodeURIComponent(`${this.settings.get('accentColor')}`)); } if (this.settings.get('portalButtonStyle')) { @@ -274,7 +274,10 @@ export default ModalComponent.extend({ if (newColor === '') { // Clear out the accent color - this.set('settings.accentColor', ''); + run.schedule('afterRender', this, function () { + this.settings.set('accentColor', ''); + this.set('accentColor', ''); + }); return; }