0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/utils/feature.js
2015-01-03 14:25:04 +00:00

24 lines
791 B
JavaScript

var Feature;
Feature = Ember.Object.extend({
init: function () {
var self = this;
this.store.find('setting').then(function (settings) {
self.set('setting', settings.get('firstObject'));
});
},
labs: Ember.computed('setting', 'setting.labs', function () {
if (this.setting) {
return JSON.parse(this.get('setting.labs') || {});
}
return {};
}),
tagsUI: Ember.computed('config.tagsUI', 'labs.tagsUI', function () {
return this.config.tagsUI || this.get('labs.tagsUI');
}),
codeInjectionUI: Ember.computed('config.codeInjectionUI', 'labs.codeInjectionUI', function () {
return this.config.codeInjectionUI || this.get('labs.codeInjectionUI');
})
});
export default Feature;