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
This commit is contained in:
Rish 2020-10-01 12:19:45 +05:30
parent 91fa87b3ed
commit 245dbef994

View File

@ -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;
}