mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Fixed custom theme settings not showing in groups
no issue - custom theme model was missing the `group` attr so the nav menu couldn't see it to assign to groups - changed homepage group from `home` to `homepage` to match gscan - added fallback to showing in the "Site-wide" group if an unknown group value is seen
This commit is contained in:
parent
b2177e636e
commit
ddac463514
@ -14,6 +14,8 @@ export default class DesignMenuComponent extends Component {
|
||||
|
||||
@tracked openSections = new TrackedSet();
|
||||
|
||||
KNOWN_GROUPS = ['homepage', 'post'];
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.fetchThemeSettingsTask.perform();
|
||||
@ -25,11 +27,11 @@ export default class DesignMenuComponent extends Component {
|
||||
}
|
||||
|
||||
get siteWideSettings() {
|
||||
return this.customThemeSettings.settings.filter(setting => !setting.group);
|
||||
return this.customThemeSettings.settings.filter(setting => !this.KNOWN_GROUPS.includes(setting.group));
|
||||
}
|
||||
|
||||
get homepageSettings() {
|
||||
return this.customThemeSettings.settings.filter(setting => setting.group === 'home');
|
||||
return this.customThemeSettings.settings.filter(setting => setting.group === 'homepage');
|
||||
}
|
||||
|
||||
get postPageSettings() {
|
||||
|
@ -5,5 +5,6 @@ export default Model.extend({
|
||||
type: attr('string'),
|
||||
options: attr(),
|
||||
default: attr('string'),
|
||||
value: attr('string')
|
||||
value: attr('string'),
|
||||
group: attr('string')
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user