mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 18:34:39 +03:00
e886e90b9d
closes #4116 - Adds css classes to settings views
29 lines
1.0 KiB
JavaScript
29 lines
1.0 KiB
JavaScript
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
|
classNames: ['settings-view-about'],
|
|
|
|
cachedConfig: false,
|
|
model: function () {
|
|
var cachedConfig = this.get('cachedConfig'),
|
|
self = this;
|
|
if (cachedConfig) {
|
|
return cachedConfig;
|
|
}
|
|
|
|
return ic.ajax.request(this.get('ghostPaths.url').api('configuration'))
|
|
.then(function (configurationResponse) {
|
|
var configKeyValues = configurationResponse.configuration;
|
|
cachedConfig = {};
|
|
configKeyValues.forEach(function (configKeyValue) {
|
|
cachedConfig[configKeyValue.key] = configKeyValue.value;
|
|
});
|
|
self.set('cachedConfig', cachedConfig);
|
|
return cachedConfig;
|
|
});
|
|
}
|
|
});
|
|
|
|
export default SettingsAboutRoute;
|