mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
Added auto-check of match helper flag when enabling custom theme settings
no issue - custom themes settings isn't really usable without the `{{match}}` helper so to help avoid confusion we'll now enable it whenever the custom theme settings flag is enabled - added `requires` array to the feature definition which when set will enable all flags in the array when the main feature is enabled
This commit is contained in:
parent
3477be5974
commit
3f7cdb34d9
@ -56,7 +56,7 @@ export default Service.extend({
|
||||
multipleProducts: feature('multipleProducts'),
|
||||
offers: feature('offers', {developer: true}),
|
||||
oauthLogin: feature('oauthLogin', {developer: true}),
|
||||
customThemeSettings: feature('customThemeSettings', {developer: true}),
|
||||
customThemeSettings: feature('customThemeSettings', {developer: true, requires: ['matchHelper']}),
|
||||
membersActivity: feature('membersActivity', {developer: true}),
|
||||
|
||||
_user: null,
|
||||
@ -96,6 +96,12 @@ export default Service.extend({
|
||||
// set the new key value for either the labs property or the accessibility property
|
||||
set(featureObject, key, value);
|
||||
|
||||
if (options.requires && value === true) {
|
||||
options.requires.forEach((flag) => {
|
||||
set(featureObject, flag, true);
|
||||
});
|
||||
}
|
||||
|
||||
// update the 'labs' or 'accessibility' key of the model
|
||||
model.set(serviceProperty, JSON.stringify(featureObject));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user