mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-16 00:42:18 +00:00
Merge pull request #3298 from thepeopleseason/streaks-updates
Achievement modal updates (Streak/Beastmaster)
This commit is contained in:
commit
208d2a6bc4
3 changed files with 22 additions and 5 deletions
|
|
@ -55,6 +55,8 @@ critColor = #fce5cd
|
|||
critText = #dc5000
|
||||
dropColor = #d9ead3
|
||||
dropText = #415838
|
||||
streakColor = #f5deb3
|
||||
streakText = #a0522d
|
||||
borderDarken = 20%
|
||||
|
||||
// alert styles
|
||||
|
|
@ -99,8 +101,13 @@ borderDarken = 20%
|
|||
border-color: darken(dropColor,borderDarken)
|
||||
color: dropText
|
||||
|
||||
.alert-streak
|
||||
background-color: streakColor
|
||||
border-color: darken(streakColor,borderDarken)
|
||||
color: streakText
|
||||
|
||||
.undo-button
|
||||
z-index: 3000
|
||||
position:absolute
|
||||
left:5px
|
||||
top:5px
|
||||
top:5px
|
||||
|
|
|
|||
|
|
@ -67,7 +67,12 @@ habitrpg.controller('NotificationCtrl',
|
|||
|
||||
$rootScope.$watch('user.achievements.streak', function(after, before){
|
||||
if(before == undefined || after == before || after < before) return;
|
||||
$rootScope.openModal('achievements/streak');
|
||||
if (User.user.achievements.streak > 1) {
|
||||
Notification.streak(User.user.achievements.streak);
|
||||
}
|
||||
else {
|
||||
$rootScope.openModal('achievements/streak');
|
||||
}
|
||||
});
|
||||
|
||||
$rootScope.$watch('user.achievements.ultimateGear', function(after, before){
|
||||
|
|
@ -76,10 +81,12 @@ habitrpg.controller('NotificationCtrl',
|
|||
});
|
||||
|
||||
$rootScope.$watch('user.items.pets', function(after, before){
|
||||
if(_.size(after) === _.size(before) ||
|
||||
if(_.size(after) === _.size(before) ||
|
||||
Shared.countPets(null, after) < 90) return;
|
||||
User.user.achievements.beastMaster = true;
|
||||
$rootScope.openModal('achievements/beastMaster');
|
||||
if (User.user.achievements.beastMaster == false) {
|
||||
User.user.achievements.beastMaster = true;
|
||||
$rootScope.openModal('achievements/beastMaster');
|
||||
}
|
||||
}, true);
|
||||
|
||||
$rootScope.$watch('user.achievements.rebirths', function(after, before){
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ angular.module("notificationServices", [])
|
|||
crit: function(val) {
|
||||
notify(window.env.t('critBonus') + Math.round(val) + "%", 'crit', 'glyphicon glyphicon-certificate');
|
||||
},
|
||||
streak: function(val) {
|
||||
notify(window.env.t('streakName') + ': ' + val, 'streak', 'glyphicon glyphicon-repeat');
|
||||
},
|
||||
drop: function(val) {
|
||||
notify(val, 'drop', 'glyphicon glyphicon-gift');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue