mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
00ce91ce3a
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
26 lines
637 B
JavaScript
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);
|
|
})
|
|
});
|