Merge pull request #3280 from thepulkitagarwal/master

Add level to user profile page
This commit is contained in:
Nick Winter 2015-12-24 06:32:38 -08:00
commit 00fe5a6c0c
2 changed files with 6 additions and 0 deletions

View file

@ -22,6 +22,10 @@ block append content
span(data-i18n="user.favorite_prefix") Favorite language is
strong.favorite-language= favoriteLanguage
span(data-i18n="user.favorite_postfix") .
if playerLevel
div.extra-info
span Level
strong= playerLevel
- var emails = user.getEnabledEmails()
// TODO: fix this, use some other method for finding contributor classes other than email settings, since they're private... Maybe achievements?
if emails

View file

@ -46,9 +46,11 @@ module.exports = class MainUserView extends UserView
if count > mostUsedCount
mostUsedCount = count
favoriteLanguage = language
playerLevel = @user.level()
context.singlePlayerSessions = singlePlayerSessions
context.multiPlayerSessions = multiPlayerSessions
context.favoriteLanguage = favoriteLanguage
context.playerLevel = playerLevel
if @earnedAchievements and @earnedAchievements.loaded
context.earnedAchievements = @earnedAchievements
if @clans and @clans.loaded