Added support for explicit HTTP permalinks

This commit is contained in:
rr-
2015-07-02 20:24:01 +02:00
parent 3c83f711c9
commit 11648e055c
5 changed files with 22 additions and 1 deletions

View File

@ -141,6 +141,7 @@ App.Auth = function(_, jQuery, util, api, appState, promise) {
appState.set('loginToken', response.json.token && response.json.token.name);
appState.set('loggedIn', response.json.user && !!response.json.user.id);
appState.set('loggedInUser', response.json.user);
appState.set('config', response.json.config);
}
function isLoggedIn(userName) {

View File

@ -4,6 +4,7 @@ App.Presenters = App.Presenters || {};
App.Presenters.PostPresenter = function(
_,
jQuery,
appState,
util,
promise,
api,
@ -171,6 +172,7 @@ App.Presenters.PostPresenter = function(
return templates.post({
query: params.query,
post: post,
forceHttpInPermalinks: appState.get('config')['forceHttpInPermalinks'],
ownScore: post.ownScore,
postFavorites: post.favorites,
postHistory: post.history,
@ -334,6 +336,7 @@ App.Presenters.PostPresenter = function(
App.DI.register('postPresenter', [
'_',
'jQuery',
'appState',
'util',
'promise',
'api',