mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
update notifications lib
This commit is contained in:
parent
d0bd62bf02
commit
7045b5c214
1 changed files with 12 additions and 8 deletions
|
|
@ -1,15 +1,17 @@
|
|||
export function getDropClass (item) {
|
||||
export function getDropClass ({type, key}) {
|
||||
let dropClass = '';
|
||||
if (item) {
|
||||
switch (item.type) {
|
||||
|
||||
if (type) {
|
||||
switch (type) {
|
||||
case 'Egg':
|
||||
dropClass = `Pet_Egg_${item.key}`;
|
||||
dropClass = `Pet_Egg_${key}`;
|
||||
break;
|
||||
case 'HatchingPotion':
|
||||
dropClass = `Pet_HatchingPotion_${item.key}`;
|
||||
dropClass = `Pet_HatchingPotion_${key}`;
|
||||
break;
|
||||
case 'Food':
|
||||
dropClass = `Pet_Food_${item.key}`;
|
||||
case 'food':
|
||||
dropClass = `Pet_Food_${key}`;
|
||||
break;
|
||||
case 'armor':
|
||||
case 'back':
|
||||
|
|
@ -19,11 +21,13 @@ export function getDropClass (item) {
|
|||
case 'headAccessory':
|
||||
case 'shield':
|
||||
case 'weapon':
|
||||
dropClass = `shop_${item.key}`;
|
||||
case 'gear':
|
||||
dropClass = `shop_${key}`;
|
||||
break;
|
||||
default:
|
||||
dropClass = 'glyphicon glyphicon-gift';
|
||||
}
|
||||
}
|
||||
|
||||
return dropClass;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue