feat(modals): Levelup modal

Introduces a new modal that displays whenever the user levels up.
This commit is contained in:
Sabe Jones
2015-10-13 16:32:07 -04:00
parent 5eacba54b8
commit 6505824cb6
4 changed files with 24 additions and 0 deletions

View File

@@ -64,6 +64,10 @@
"ultimGearText": "Has upgraded to the maximum weapon and armor set for the following classes:",
"level": "Level",
"levelUp": "Level Up!",
"gainedLevel": "You gained a level!",
"leveledUp": "By accomplishing your real-life goals, you've grown to <strong>Level <%= level %>!</strong>",
"fullyHealed": "You have been fully healed!",
"huzzah": "Huzzah!",
"mana": "Mana",
"hp": "HP",
"mp": "MP",

View File

@@ -153,6 +153,7 @@ habitrpg.controller('NotificationCtrl',
if (after > before) {
Notification.lvl();
$rootScope.playSound('Level_Up');
$rootScope.openModal('levelUp', {controller:'UserCtrl', size:'sm'});
}
});

View File

@@ -14,6 +14,7 @@ include ./limited
include ./invite-friends
include ./welcome.jade
include ./low-health.jade
include ./level-up.jade
//- Settings
script(type='text/ng-template', id='modals/change-day-start.html')

View File

@@ -0,0 +1,18 @@
include ../avatar/generated_avatar
script(type='text/ng-template', id='modals/levelUp.html')
.modal-content(style='min-width:28em')
.modal-body.text-center
h3(style='margin-bottom: 0')=env.t('gainedLevel')
.container-fluid
.row
.herobox(style='margin:auto 8.5em; width: 6em; height: 9em; padding-top: 0')
.character-sprites(style='margin: 0; width: 0')
+generatedAvatar
.row
.herobox(style='margin:auto 9em; width: 6em; height: 0; padding-top: 0')
.avatar-level(ng-class='userLevelStyle(user)')=env.t('level')+' {{user.stats.lvl}}'
h4(style='margin-top: 1em')!=env.t('leveledUp', {level:'{{user.stats.lvl}}'})
p=env.t('fullyHealed')
.modal-footer(style='margin-top:0')
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')