mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
Don't show items in the seasonal shop that can't be purchased (#7859)
* making an api chnage so the seasonal shop will only return items that the user has never owned instead of all items the user doesn't currently own * fixing commit so shop doesn't show already owned items * recommenting out seasonal shop message as it's currently closed
This commit is contained in:
parent
f20a7b851f
commit
282822def6
2 changed files with 3 additions and 5 deletions
|
|
@ -231,7 +231,7 @@ shops.getSeasonalShopCategories = function getSeasonalShopCategories (user, lang
|
|||
if (gear.index !== key) {
|
||||
return false;
|
||||
}
|
||||
return user.items.gear.owned[gear.key] !== true;
|
||||
return user.items.gear.owned[gear.key] === undefined;
|
||||
}).where({index: key}).map(gear => {
|
||||
return {
|
||||
key: gear.key,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
p(ng-if='!env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText')
|
||||
p(ng-if='env.worldDmg.seasonalShop')!=env.t('seasonalShopClosedText')
|
||||
|
||||
.well(ng-if='User.user.achievements.rebirths > 0')=env.t('seasonalShopRebirth')
|
||||
// .well=env.t('seasonalShopRebirth')
|
||||
|
||||
// li.customize-menu.inventory-gear
|
||||
menu.pets-menu(label=env.t('seasonalItems'))
|
||||
|
|
@ -22,9 +22,7 @@
|
|||
p {{::Content.spells.special.seafoam.value}}
|
||||
span(class='shop_gold')
|
||||
menu.pets-menu(label='{{category.text}}', ng-repeat='category in seasonalShopCategories')
|
||||
div(ng-repeat='item in category.items',
|
||||
ng-class="{transparent: user.items.gear.owned[item.key] !== undefined}",
|
||||
ng-if='!user.items.gear.owned[item.key]')
|
||||
div(ng-repeat='item in category.items', ng-if='!user.items.gear.owned[item.key]')
|
||||
button.customize-option(class='shop_{{item.key}}',
|
||||
popover='{{item.notes}}', popover-title='{{item.text}}',
|
||||
popover-trigger='mouseenter', popover-placement='right',
|
||||
|
|
|
|||
Loading…
Reference in a new issue