mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
25 lines
683 B
JavaScript
25 lines
683 B
JavaScript
import Service from 'ember-service';
|
|
import computed from 'ember-computed';
|
|
import injectService from 'ember-service/inject';
|
|
|
|
export default Service.extend({
|
|
store: injectService(),
|
|
|
|
_parseTimezones(settings) {
|
|
let activeTimezone = settings.get('activeTimezone');
|
|
return activeTimezone;
|
|
},
|
|
|
|
_settings: computed(function () {
|
|
let store = this.get('store');
|
|
return store.queryRecord('setting', {type: 'blog,theme,private'});
|
|
}),
|
|
|
|
blogTimezone: computed('_settings.activeTimezone', function () {
|
|
return this.get('_settings').then((settings) => {
|
|
return this._parseTimezones(settings);
|
|
});
|
|
})
|
|
|
|
});
|