0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Allowed accent color setting for site with portal flag

no issue

- We had previously allowed accent_color setting for member site settings behind portal flag, but Ghost Admin also needs the public site setting with accent color to correctly reflect the accent color when flag is switched on
- Removes deletion of accent color setting when behind the Portal flag OR dev experiment flag
This commit is contained in:
Rish 2020-10-02 15:30:54 +05:30
parent d9c643ab10
commit 58fda5bad2
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ const site = {
};
// accent_color is currently an experimental feature
if (!config.get('enableDeveloperExperiments')) {
if (!config.get('enableDeveloperExperiments') && !config.get('portal')) {
delete response.accent_color;
}

View file

@ -104,13 +104,13 @@ const mapSettings = (attrs, frame) => {
// fields completely.
if (_.isArray(attrs)) {
attrs = _.filter(attrs, (o) => {
if (o.key === 'accent_color' && !config.get('enableDeveloperExperiments')) {
if (o.key === 'accent_color' && !config.get('enableDeveloperExperiments') && !config.get('portal')) {
return false;
}
return o.key !== 'ghost_head' && o.key !== 'ghost_foot';
});
} else {
if (!config.get('enableDeveloperExperiments')) {
if (!config.get('enableDeveloperExperiments') && !config.get('portal')) {
delete attrs.accent_color;
}
}