add TODO comments, send mods to client as they are used there

This commit is contained in:
Matteo Pagliazzi 2015-08-14 21:05:04 +02:00
parent f896fdf16f
commit 2e1b046701
3 changed files with 3 additions and 1 deletions

View file

@ -14,7 +14,7 @@ var mods = require('../models/user').mods;
var clientVars = ['language', 'isStaticPage', 'avalaibleLanguages', 'translations',
'FACEBOOK_KEY', 'NODE_ENV', 'BASE_URL', 'GA_ID',
'AMAZON_PAYMENTS', 'STRIPE_PUB_KEY', 'AMPLITUDE_KEY',
'worldDmg', 'IS_MOBILE'];
'worldDmg', 'mods', 'IS_MOBILE'];
var env = {
getManifestFiles: buildManifest.getManifestFiles,

View file

@ -10,6 +10,7 @@ html(ng-app="habitrpg")
// .slice(0).push('user') is to clone the array,
// to be surethat `user` is never avalaible to other requests' env
// TODO does it need only `user` in clientVars, not the others?
-
clientVars = env.clientVars.slice(0);
clientVars.push('user');

View file

@ -144,6 +144,7 @@
include ./chat-box
.alert.alert-info.alert-sm
!= ' ' + env.t('tavernAlert1') + ' <a href="https://github.com/HabitRPG/habitrpg/issues/2760" target="_blank">' + env.t('tavernAlert2') + '</a>.<br />' + env.t('moderatorIntro1')
//- FIXME this could be rendered server-side?
span(ng-repeat='mod in env.mods')
|&nbsp; &nbsp;
span(ng-if='::mod.contributor.admin',popover=env.t('gamemaster'),popover-trigger='mouseenter',popover-placement='right')