[WIP] New Client - Shops/Market (#8884)

* initial market - routing - store - load market data

* move drawer/drawerSlider / count/star badge to components/ui

* filter market categories

* shopItem with gem / gold

* show count of purchable items

* show count of purchable itemsshow drawer with currently owned items + DrawerHeaderTabs-Component

* show featured gear

* show Gear - filter by class - sort by (type, price, stats) - sort market items

* Component: ItemRows - shows only the max items in one row (depending on the available width)

* Sell Dialog + Balance Component

* generic buy-dialog / attributes grid with highlight

* buyItem - hide already owned gear

* filter: hide locked/pinned - lock items if not enough gold

* API: Sell multiple items

* show avatar in buy-equipment-dialog with changed gear

* market banner

* misc fixes

* filter by text

* pin/unpin gear store actions

* Sell API: amount as query-parameter

* Update user.js

* fixes

* fix sell api amount test

* add back stroke/fill currentColor

* use scss variables
This commit is contained in:
negue
2017-07-27 19:41:23 +02:00
committed by GitHub
parent 18b04e713e
commit f72f71fd32
43 changed files with 1754 additions and 49 deletions

View File

@@ -16,21 +16,21 @@
// Show avatar only if not currently affected by visual buff
template(v-if!="!member.stats.buffs.snowball && !member.stats.buffs.spookySparkles && !member.stats.buffs.shinySeed && !member.stats.buffs.seafoam")
span(:class="'chair_' + member.preferences.chair")
span(:class="member.items.gear[costumeClass].back")
span(:class="getGearClass('back')")
span(:class="skinClass")
span.head_0
span(:class="member.preferences.size + '_shirt_' + member.preferences.shirt")
span(:class="member.preferences.size + '_' + member.items.gear[costumeClass].armor")
span(:class="member.items.gear[costumeClass].back_collar")
span(:class="member.items.gear[costumeClass].body")
span(:class="member.preferences.size + '_' + getGearClass('armor')")
span(:class="getGearClass('back_collar')")
span(:class="getGearClass('body')")
template(v-for="type in ['base', 'bangs', 'mustache', 'beard']")
span(:class="'hair_' + type + '_' + member.preferences.hair[type] + '_' + member.preferences.hair.color")
span(:class="member.items.gear[costumeClass].eyewear")
span(:class="member.items.gear[costumeClass].head")
span(:class="member.items.gear[costumeClass].headAccessory")
span(:class="getGearClass('eyewear')")
span(:class="getGearClass('head')")
span(:class="getGearClass('headAccessory')")
span(:class="'hair_flower_' + member.preferences.hair.flower")
span(:class="member.items.gear[costumeClass].shield")
span(:class="member.items.gear[costumeClass].weapon")
span(:class="getGearClass('shield')")
span(:class="getGearClass('weapon')")
// Resting
span.zzz(v-if="member.preferences.sleep")
@@ -105,6 +105,12 @@ export default {
type: Boolean,
default: false,
},
withBackground: {
type: Boolean,
},
overrideAvatarGear: {
type: Object,
},
width: {
type: Number,
default: 140,
@@ -144,7 +150,9 @@ export default {
backgroundClass () {
let background = this.member.preferences.background;
if (background && !this.avatarOnly) {
let allowToShowBackground = !this.avatarOnly || this.withBackground;
if (background && allowToShowBackground) {
return `background_${this.member.preferences.background}`;
}
@@ -167,5 +175,16 @@ export default {
return this.member.preferences.costume ? 'costume' : 'equipped';
},
},
methods: {
getGearClass (gearType) {
let result = this.member.items.gear[this.costumeClass][gearType];
if (this.overrideAvatarGear && this.overrideAvatarGear[gearType]) {
result = this.overrideAvatarGear[gearType];
}
return result;
},
},
};
</script>