2017-08-22 10:53:26 +03:00
|
|
|
import EmberObject from '@ember/object';
|
2016-05-24 15:06:59 +03:00
|
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
2017-08-22 10:53:26 +03:00
|
|
|
import {computed} from '@ember/object';
|
|
|
|
import {isBlank} from '@ember/utils';
|
2016-03-29 11:40:44 +03:00
|
|
|
|
2016-06-11 19:52:36 +03:00
|
|
|
export default EmberObject.extend(ValidationEngine, {
|
2016-03-29 11:40:44 +03:00
|
|
|
// values entered here will act as defaults
|
|
|
|
url: '',
|
2019-01-21 15:26:21 +03:00
|
|
|
username: '',
|
2016-03-29 11:40:44 +03:00
|
|
|
|
|
|
|
validationType: 'slackIntegration',
|
|
|
|
|
|
|
|
isActive: computed('url', function () {
|
2019-03-06 16:53:54 +03:00
|
|
|
let url = this.url;
|
2016-03-29 11:40:44 +03:00
|
|
|
return !isBlank(url);
|
|
|
|
})
|
|
|
|
});
|