[IMP] website: remove the old color palette *re*generation
Changing 'alpha' does not change the other colors which have been chosen by the user. If only 'alpha' is chosen by the user, then the other colors are still adapted accordinly (compatibility). Part of https://github.com/odoo/odoo/pull/45856 task-2197038
This commit is contained in:
@@ -343,16 +343,7 @@ options.Class.include({
|
||||
color = style.getPropertyValue('--' + color).trim();
|
||||
color = ColorpickerWidget.normalizeCSSColor(color);
|
||||
}
|
||||
const colors = {};
|
||||
colors[params.color] = color;
|
||||
if (params.color === 'alpha') {
|
||||
colors['beta'] = null;
|
||||
colors['gamma'] = null;
|
||||
colors['delta'] = null;
|
||||
colors['epsilon'] = null;
|
||||
}
|
||||
|
||||
return this._makeSCSSCusto(url, colors);
|
||||
return this._makeSCSSCusto(url, {[params.color]: color});
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -632,14 +632,12 @@
|
||||
<we-button class="o_we_primary_btn" data-switch-theme="" data-no-preview="true">Switch Theme</we-button>
|
||||
<we-row string="Main Colors">
|
||||
<we-colorpicker data-name="primary_color_opt" title="Primary" data-customize-website-color="" data-color-type="theme" data-color="primary"/>
|
||||
<we-colorpicker data-name="alpha_as_primary_color_opt" data-customize-website-color="" data-color-type="theme" data-color="alpha"
|
||||
title="Changing this color will regenerate the default theme color scheme"/>
|
||||
<we-colorpicker data-name="alpha_as_primary_color_opt" data-customize-website-color="" data-color-type="theme" data-color="alpha"/>
|
||||
<we-colorpicker data-name="secondary_color_opt" title="Secondary" data-customize-website-color="" data-color-type="theme" data-color="secondary"/>
|
||||
<we-colorpicker data-name="beta_as_secondary_color_opt" title="Secondary" data-customize-website-color="" data-color-type="theme" data-color="beta"/>
|
||||
</we-row>
|
||||
<we-row string="Extra Colors">
|
||||
<we-colorpicker data-name="alpha_as_extra_color_opt" data-customize-website-color="" data-color-type="theme" data-color="alpha"
|
||||
title="Changing this color will regenerate the default theme color scheme"/>
|
||||
<we-colorpicker data-name="alpha_as_extra_color_opt" data-customize-website-color="" data-color-type="theme" data-color="alpha"/>
|
||||
<we-colorpicker data-name="beta_as_extra_color_opt" data-customize-website-color="" data-color-type="theme" data-color="beta"/>
|
||||
<we-colorpicker data-customize-website-color="" data-color-type="theme" data-color="gamma"/>
|
||||
<we-colorpicker data-customize-website-color="" data-color-type="theme" data-color="delta"/>
|
||||
|
||||
Reference in New Issue
Block a user