mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
[WIP] Client/multiple fixes shops (#8956)
* reposition FlyingPigs and Hydra * hide count-badge if 0 * fix sortBy hatchable (ignore already hatched pets) * always show animal name * featuredItems, use shopItem objects * fix egg / potion names in market * buyModals: check for price, mark it if not enough available / change buy-button opacity / show purchaseGems button * save itemRows open/collapsed state during session, refactor itemRows for some more performance * pin featured items * show bordered items in market buyModal * fix popover margins / paddings * position pinned items popovers to the left
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
:items="pets(petGroup, hideMissing, selectedSortBy, searchTextThrottled)",
|
||||
:itemWidth=94,
|
||||
:itemMargin=24,
|
||||
:type="petGroup.key",
|
||||
)
|
||||
template(slot="item", scope="context")
|
||||
div(
|
||||
@@ -99,14 +100,12 @@
|
||||
:popoverPosition="'top'",
|
||||
:progress="context.item.progress",
|
||||
:emptyItem="!context.item.isOwned()",
|
||||
:showPopover="context.item.isOwned() || context.item.isHatchable()",
|
||||
:showPopover="true",
|
||||
:highlightBorder="highlightPet == context.item.key",
|
||||
@click="petClicked(context.item)"
|
||||
)
|
||||
span(slot="popoverContent")
|
||||
div(v-if="context.item.isOwned()")
|
||||
h4.popover-content-title {{ context.item.name }}
|
||||
div.hatchablePopover(v-else-if="context.item.isHatchable()")
|
||||
div.hatchablePopover(v-if="context.item.isHatchable()")
|
||||
h4.popover-content-title {{ context.item.name }}
|
||||
div.popover-content-text(v-html="$t('haveHatchablePet', { potion: context.item.potionName, egg: context.item.eggName })")
|
||||
div.potionEggGroup
|
||||
@@ -115,6 +114,9 @@
|
||||
div.potionEggBackground
|
||||
div(:class="'Pet_Egg_'+context.item.eggKey")
|
||||
|
||||
div(v-else)
|
||||
h4.popover-content-title {{ context.item.name }}
|
||||
|
||||
template(slot="itemBadge", scope="context")
|
||||
starBadge(
|
||||
:selected="context.item.key === currentPet",
|
||||
@@ -138,6 +140,7 @@
|
||||
:items="mounts(mountGroup, hideMissing, selectedSortBy, searchTextThrottled)",
|
||||
:itemWidth=94,
|
||||
:itemMargin=24,
|
||||
:type="mountGroup.key",
|
||||
)
|
||||
template(slot="item", scope="context")
|
||||
mountItem(
|
||||
@@ -146,7 +149,7 @@
|
||||
:key="context.item.key",
|
||||
:popoverPosition="'top'",
|
||||
:emptyItem="!context.item.isOwned()",
|
||||
:showPopover="context.item.isOwned()",
|
||||
:showPopover="true",
|
||||
@click="selectMount(context.item)"
|
||||
)
|
||||
span(slot="popoverContent")
|
||||
@@ -273,11 +276,18 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.stable .item .item-content.Pet {
|
||||
position: absolute;
|
||||
.stable .item .item-content.Pet:not(.FlyingPig) {
|
||||
top: -28px;
|
||||
}
|
||||
|
||||
.stable .item .item-content.FlyingPig {
|
||||
top: 7px;
|
||||
}
|
||||
|
||||
.stable .item .item-content.Pet-Dragon-Hydra {
|
||||
top: -16px !important;
|
||||
}
|
||||
|
||||
.hatchablePopover {
|
||||
width: 180px
|
||||
}
|
||||
@@ -833,7 +843,7 @@
|
||||
|
||||
getPetItemClass (pet) {
|
||||
if (pet.isOwned()) {
|
||||
return `Pet Pet-${pet.key}`;
|
||||
return `Pet Pet-${pet.key} ${pet.eggKey}`;
|
||||
}
|
||||
|
||||
if (pet.mountOwned()) {
|
||||
|
||||
Reference in New Issue
Block a user