WIP(shops): more fixes

This commit is contained in:
Sabe Jones
2024-05-17 20:29:14 -05:00
parent 3bb1cceed1
commit 8d479e358d
10 changed files with 94 additions and 136 deletions
@@ -6,6 +6,7 @@
:initial-item="selectedGearCategory"
:items="marketGearCategories"
:with-icon="true"
:direct-select="true"
@selected="selectedGroupGearByClass = $event.id"
>
<span
@@ -23,6 +24,7 @@
:label="$t('sortBy')"
:initial-item="selectedSortGearBy"
:items="sortGearBy"
:direct-select="true"
@selected="selectedSortGearBy = $event"
>
<span
@@ -93,7 +95,7 @@ import pinUtils from '../../../mixins/pinUtils';
const sortGearTypes = [
'sortByType', 'sortByPrice', 'sortByCon',
'sortByPer', 'sortByStr', 'sortByInt',
].map(g => ({ id: g }));
].map(g => ({ id: g, identifier: g }));
const sortGearTypeMap = {
sortByType: 'type',
@@ -43,6 +43,7 @@
:label="$t('sortBy')"
:initial-item="selectedSortItemsBy"
:items="sortItemsBy"
:direct-select="true"
@selected="selectedSortItemsBy = $event"
>
<span
@@ -181,7 +182,7 @@ import inventoryUtils from '@/mixins/inventoryUtils';
import pinUtils from '@/mixins/pinUtils';
import { worldStateMixin } from '@/mixins/worldState';
const sortItems = ['AZ', 'sortByNumber'].map(g => ({ id: g }));
const sortItems = ['AZ', 'sortByNumber'].map(g => ({ id: g, identifier: g }));
export default {
components: {
@@ -121,17 +121,6 @@
<h2 class="float-left mb-3">
{{ $t('classArmor') }}
</h2>
<div class="float-right">
<span class="dropdown-label">{{ $t('sortBy') }}</span>
<select-translated-array
:right="true"
:value="selectedSortItemsBy"
:items="sortItemsBy"
:inline-dropdown="false"
class="inline"
@select="selectedSortItemsBy = $event"
/>
</div>
</div>
<div
v-for="(groupSets, categoryGroup) in getGroupedCategories(categories)"
@@ -160,7 +149,7 @@
<div class="items">
<!-- eslint-disable max-len -->
<shopItem
v-for="item in seasonalItems(category, selectedSortItemsBy, searchTextThrottled, viewOptions, hidePinned)"
v-for="item in seasonalItems(category, 'AZ', searchTextThrottled, viewOptions, hidePinned)"
:key="item.key"
:item="item"
:price="item.value"
@@ -353,15 +342,11 @@ import svgWizard from '@/assets/svg/wizard.svg';
import svgRogue from '@/assets/svg/rogue.svg';
import svgHealer from '@/assets/svg/healer.svg';
import SelectTranslatedArray from '@/components/tasks/modal-controls/selectTranslatedArray';
import FilterSidebar from '@/components/ui/filterSidebar';
import FilterGroup from '@/components/ui/filterGroup';
import { worldStateMixin } from '@/mixins/worldState';
export default {
components: {
SelectTranslatedArray,
FilterGroup,
FilterSidebar,
Checkbox,
PinBadge,
@@ -393,9 +378,6 @@ export default {
eyewear: i18n.t('eyewear'),
}),
sortItemsBy: ['AZ'],
selectedSortItemsBy: 'AZ',
hidePinned: false,
featuredGearBought: false,
currentEvent: null,
@@ -113,34 +113,7 @@
:price-type="ctx.item.currency"
:empty-item="false"
@click="selectItemToBuy(ctx.item)"
>
<span
v-if="category !== 'quests'"
slot="popoverContent"
slot-scope="ctx"
><div><h4 class="popover-content-title">{{ ctx.item.text }}</h4></div></span>
<span
v-if="category === 'quests'"
slot="popoverContent"
><div class="questPopover">
<h4 class="popover-content-title">{{ item.text }}</h4>
<questInfo :quest="item" />
</div></span>
<template
slot="itemBadge"
slot-scope="ctx"
>
<span
v-if="ctx.item.pinType !== 'IGNORE'"
class="badge-top"
@click.prevent.stop="togglePinned(ctx.item)"
>
<pin-badge
:pinned="ctx.item.pinned"
/>
</span>
</template>
</shopItem>
/>
</template>
</itemRows>
</div>
@@ -184,8 +157,6 @@ import { mapState } from '@/libs/store';
import ShopItem from '../shopItem';
import Item from '@/components/inventory/item';
import ItemRows from '@/components/ui/itemRows';
import QuestInfo from '../quests/questInfo.vue';
import PinBadge from '@/components/ui/pinBadge';
import toggleSwitch from '@/components/ui/toggleSwitch';
import BuyQuestModal from '../quests/buyQuestModal.vue';
@@ -207,9 +178,7 @@ export default {
ShopItem,
Item,
ItemRows,
PinBadge,
toggleSwitch,
QuestInfo,
BuyQuestModal,
},