mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-17 17:32:22 +00:00
Merge pull request #2406 from HabitRPG/sabe/tweak3
Create drop notification Growl style
This commit is contained in:
commit
951872d116
3 changed files with 12 additions and 2 deletions
|
|
@ -30,8 +30,10 @@ deathColor = #4E4E4E
|
|||
deathText = #ABABAB
|
||||
mpColor = #c7d3e9
|
||||
mpText = #003aa1
|
||||
critColor = #ffe3bf
|
||||
critColor = #fce5cd
|
||||
critText = #dc5000
|
||||
dropColor = #d9ead3
|
||||
dropText = #415838
|
||||
borderDarken = 20%
|
||||
|
||||
// alert styles
|
||||
|
|
@ -71,6 +73,11 @@ borderDarken = 20%
|
|||
border-color: darken(critColor,borderDarken)
|
||||
color: critText
|
||||
|
||||
.alert-drop
|
||||
background-color: dropColor
|
||||
border-color: darken(dropColor,borderDarken)
|
||||
color: dropText
|
||||
|
||||
// alert icons
|
||||
|
||||
.icon-gold
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ habitrpg.controller('NotificationCtrl',
|
|||
User.user.items[type][after.key] = 0;
|
||||
}
|
||||
User.user.items[type][after.key]++;
|
||||
Notification.text(User.user._tmp.drop.dialog);
|
||||
Notification.drop(User.user._tmp.drop.dialog);
|
||||
});
|
||||
|
||||
$rootScope.$watch('user.achievements.streak', function(after, before){
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ angular.module("notificationServices", [])
|
|||
},
|
||||
crit: function(val) {
|
||||
growl("<i class='icon-certificate'></i> Critical Hit! Bonus: " + Math.round(val) + "%", 'crit');
|
||||
},
|
||||
drop: function(val) {
|
||||
growl("<i class='icon-gift'></i> " + val, 'drop');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue