mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
737ea3f65e
Closes #3568 - Deleted html placeholders in client - Added new grunt task, buildAboutPage, which 1)creates -contributors.hbs partial and 2) downloads contributor avatars - buildAboutPage is called by anything that does an emberTemplates task - Removed unused code from ghostpaths
25 lines
927 B
JavaScript
25 lines
927 B
JavaScript
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
|
|
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, {
|
|
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;
|