fix(potions): call out limited time

This commit is contained in:
Sabe Jones
2020-04-10 15:15:23 -05:00
parent 39765895ee
commit 9c6c90a2e9
6 changed files with 27 additions and 8 deletions
@@ -11,6 +11,12 @@
<span slot="popoverContent">
<strong v-if="item.key === 'gem' && gemsLeft === 0">{{ $t('maxBuyGems') }}</strong>
<h4 class="popover-content-title">{{ item.text }}</h4>
<div
v-if="item.event"
class="mt-2"
>
{{ limitedString }}
</div>
</span>
<template
slot="itemBadge"
@@ -26,14 +32,15 @@
import _filter from 'lodash/filter';
import _sortBy from 'lodash/sortBy';
import _map from 'lodash/map';
import moment from 'moment';
import { mapState } from '@/libs/store';
import pinUtils from '@/mixins/pinUtils';
import planGemLimits from '@/../../common/script/libs/planGemLimits';
import seasonalShopConfig from '@/../../common/script/libs/shops-seasonal.config';
import ShopItem from '../shopItem';
import CategoryItem from './categoryItem';
export default {
components: {
CategoryItem,
@@ -53,6 +60,9 @@ export default {
return planGemLimits.convCap
+ this.user.purchased.plan.consecutive.gemCapExtra - this.user.purchased.plan.gemsBought;
},
limitedString () {
return this.$t('limitedOffer', { date: moment(seasonalShopConfig.dateRange.end).format('LL') });
},
sortedMarketItems () {
let result = _map(this.category.items, e => ({
...e,
@@ -299,7 +299,10 @@
<span slot="popoverContent">
<div class="questPopover">
<h4 class="popover-content-title">{{ item.text }}</h4>
<questInfo :quest="item" />
<questInfo
:quest="item"
:popoverVersion="true"
/>
</div>
</span>
<template
@@ -2,7 +2,6 @@
<div>
<div
class="row"
:class="{'small-version': smallVersion}"
>
<div
v-if="quest.collect"
@@ -31,14 +30,13 @@
<div
v-for="star of stars()"
:key="star"
class="svg-icon inline"
:class="smallVersion ? 'icon-12' : 'icon-16'"
class="svg-icon inline icon-16"
v-html="icons[star]"
></div>
</dd>
</div>
</div>
<div v-if="quest.limited">
<div v-if="quest.limited && popoverVersion">
{{ limitedString }}
</div>
</div>
@@ -133,7 +131,7 @@ export default {
quest: {
type: Object,
},
smallVersion: {
popoverVersion: {
type: Boolean,
default: false,
},
@@ -104,7 +104,7 @@
</div>
<div
v-if="item.event"
class="mt-4"
:class="item.purchaseType === 'gear' ? 'mt-4' : 'mt-2'"
>
{{ limitedString }}
</div>