mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +03:00
ed9fdbca7f
closes #5073 - takes password protection out of labs and moves it to general settings - adds random-words generator to randomly generate passwords
31 lines
763 B
JavaScript
31 lines
763 B
JavaScript
import Ember from 'ember';
|
|
var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, {
|
|
init: function () {
|
|
var promise;
|
|
|
|
promise = this.store.find('setting', {type: 'blog,theme'}).then(function (settings) {
|
|
return settings.get('firstObject');
|
|
});
|
|
|
|
this.set('promise', promise);
|
|
},
|
|
|
|
setting: Ember.computed.alias('content'),
|
|
|
|
labs: Ember.computed('isSettled', 'setting.labs', function () {
|
|
var value = {};
|
|
|
|
if (this.get('isFulfilled')) {
|
|
try {
|
|
value = JSON.parse(this.get('setting.labs') || {});
|
|
} catch (err) {
|
|
value = {};
|
|
}
|
|
}
|
|
|
|
return value;
|
|
})
|
|
});
|
|
|
|
export default FeatureController;
|