mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
57b1ab4800
no issue - part of ember upgrades - removed all unnecessary usage of `.get` - cleaned up imports where we had imports from the same module across multiple lines - standardized on importing specific computed helpers rather than using `computed.foo` - switched tests from using `wait()` to `settled()`
25 lines
609 B
JavaScript
25 lines
609 B
JavaScript
import EmberObject, {computed} from '@ember/object';
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
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);
|
|
})
|
|
});
|