Ghost/ghost/admin/app/models/navigation-item.js
Hannah Wolfe 00ce91ce3a Added Secondary Navigation (#1410)
refs: https://github.com/TryGhost/Ghost/pull/11409

- Added a new UI for a second set of navigation links
- This should support most concepts of nav, e.g. left and right, or header and footer
- This PR mostly updates the design and nav components to cope with a second set of nav
2019-12-04 11:14:45 +07:00

26 lines
637 B
JavaScript

import EmberObject from '@ember/object';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import {computed} from '@ember/object';
import {isBlank} from '@ember/utils';
export default EmberObject.extend(ValidationEngine, {
label: '',
url: '',
isNew: false,
isSecondary: false,
validationType: 'navItem',
isComplete: computed('label', 'url', function () {
let {label, url} = this;
return !isBlank(label) && !isBlank(url);
}),
isBlank: computed('label', 'url', function () {
let {label, url} = this;
return isBlank(label) && isBlank(url);
})
});