mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05: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
2 changed files with 6 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue