forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request TryGhost#5340 from jaswilli/ember-routing
Clean up Ember router map
- Loading branch information
Showing
26 changed files
with
126 additions
and
303 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
import AuthenticatedRoute from 'ghost/routes/authenticated'; | ||
import styleBody from 'ghost/mixins/style-body'; | ||
|
||
var AboutRoute = AuthenticatedRoute.extend(styleBody, { | ||
export default AuthenticatedRoute.extend(styleBody, { | ||
titleToken: 'About', | ||
|
||
classNames: ['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; | ||
}); | ||
}, | ||
|
||
renderTemplate: function () { | ||
this.render('about', {into: 'application'}); | ||
} | ||
}); | ||
|
||
export default AboutRoute; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.