mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Backgrounds / BuyModal / misc (#9009)
* remove buyModal from all views / move to app.vue - show party member selection if card was bought * add .btn style to 'show more' / 'show less' * prevent adding duplicate pinned items - reset pinned gear on rebirth * remove hourglass in items * fix unequip gear from drawer * fix bought item notification * fix background in avatar - avatar position in buyModal
This commit is contained in:
@@ -17,10 +17,16 @@ function addPinnedGearByClass (user) {
|
||||
for (let item of newPinnedItems) {
|
||||
let itemInfo = getItemInfo(user, 'marketGear', item);
|
||||
|
||||
user.pinnedItems.push({
|
||||
type: 'marketGear',
|
||||
path: itemInfo.path,
|
||||
const foundIndex = user.pinnedItems.findIndex(pinnedItem => {
|
||||
return pinnedItem.path === itemInfo.path;
|
||||
});
|
||||
|
||||
if (foundIndex === -1) {
|
||||
user.pinnedItems.push({
|
||||
type: 'marketGear',
|
||||
path: itemInfo.path,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user