mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
feat(modals): Levelup modal
Introduces a new modal that displays whenever the user levels up.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -153,6 +153,7 @@ habitrpg.controller('NotificationCtrl',
|
||||
if (after > before) {
|
||||
Notification.lvl();
|
||||
$rootScope.playSound('Level_Up');
|
||||
$rootScope.openModal('levelUp', {controller:'UserCtrl', size:'sm'});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
18
website/views/shared/modals/level-up.jade
Normal file
18
website/views/shared/modals/level-up.jade
Normal 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')
|
||||
Reference in New Issue
Block a user