Added popover stats to costume equipment on profile stats - fixes #9280 (#10136)

* Added popover stats to costume equipment on the stats page of a profile (#9280)

* Changed popover position to bottom for equip and costume items.

* Fixed indent on line 160

* Changed escaped double quotes to single quotes for readability
This commit is contained in:
Chris Wang
2018-03-18 10:24:41 -05:00
committed by Matteo Pagliazzi
parent e18e89bc10
commit fff4ea3ad3

View File

@@ -131,10 +131,10 @@ div
) )
div(:class="`shop_${equippedItems[key]}`") div(:class="`shop_${equippedItems[key]}`")
b-popover( b-popover(
v-if="label !== 'skip' && equippedItems[key] && equippedItems[key].indexOf(\"base_0\") === -1", v-if="label !== 'skip' && equippedItems[key] && equippedItems[key].indexOf('base_0') === -1",
:target="key", :target="key",
triggers="hover", triggers="hover",
:placement="'right'", :placement="'bottom'",
:preventOverflow="false", :preventOverflow="false",
) )
h4.gearTitle {{ getGearTitle(equippedItems[key]) }} h4.gearTitle {{ getGearTitle(equippedItems[key]) }}
@@ -146,42 +146,35 @@ div
.col-12.col-md-6 .col-12.col-md-6
h2.text-center {{$t('costume')}} h2.text-center {{$t('costume')}}
.well .well
.col-12.col-md-4.item-wrapper // Use similar for loop for costume items, except show background if label is 'skip'.
.box(:class='{white: costumeItems.eyewear && costumeItems.eyewear.indexOf("base_0") === -1}') .col-12.col-md-4.item-wrapper(v-for="(label, key) in equipTypes")
div(:class="`shop_${costumeItems.eyewear}`") // Append a "C" to the key name since HTML IDs have to be unique.
h3 {{$t('eyewear')}} .box(
.col-12.col-md-4.item-wrapper :id="key + 'C'",
.box(:class='{white: costumeItems.head && costumeItems.head.indexOf("base_0") === -1}') v-if="label !== 'skip'",
div(:class="`shop_${costumeItems.head}`") :class='{white: costumeItems[key] && costumeItems[key].indexOf("base_0") === -1}'
h3 {{$t('headgearCapitalized')}} )
.col-12.col-md-4.item-wrapper div(:class="`shop_${costumeItems[key]}`")
.box(:class='{white: costumeItems.headAccessory && costumeItems.headAccessory.indexOf("base_0") === -1}') // Show background on 8th tile rather than a piece of equipment.
div(:class="`shop_${costumeItems.headAccessory}`") .box(v-if="label === 'skip'",
h3 {{$t('headAccess')}} :class='{white: user.preferences.background}', style="overflow:hidden"
.col-12.col-md-4.item-wrapper )
.box(:class='{white: costumeItems.back && costumeItems.back.indexOf("base_0") === -1}')
div(:class="`shop_${costumeItems.back}`")
h3 {{$t('backAccess')}}
.col-12.col-md-4.item-wrapper
.box(:class='{white: costumeItems.armor && costumeItems.armor.indexOf("base_0") === -1}')
div(:class="`shop_${costumeItems.armor}`")
h3 {{$t('armorCapitalized')}}
.col-12.col-md-4.item-wrapper
.box(:class='{white: costumeItems.body && costumeItems.body.indexOf("base_0") === -1}')
div(:class="`shop_${costumeItems.body}`")
h3 {{$t('bodyAccess')}}
.col-12.col-md-4.item-wrapper
.box(:class='{white: costumeItems.weapon && costumeItems.weapon.indexOf("base_0") === -1}')
div(:class="`shop_${costumeItems.weapon}`")
h3 {{$t('mainHand')}}
.col-12.col-md-4.item-wrapper
.box(:class='{white: user.preferences.background}', style="overflow:hidden")
div(:class="'icon_background_' + user.preferences.background") div(:class="'icon_background_' + user.preferences.background")
h3 {{$t('background')}} b-popover(
.col-12.col-md-4.item-wrapper v-if="label !== 'skip' && costumeItems[key] && costumeItems[key].indexOf('base_0') === -1",
.box(:class='{white: costumeItems.shield && costumeItems.shield.indexOf("base_0") === -1}') :target="key + 'C'",
div(:class="`shop_${costumeItems.shield}`") triggers="hover",
h3 {{$t('offHand')}} :placement="'bottom'",
:preventOverflow="false",
)
h4.gearTitle {{ getGearTitle(costumeItems[key]) }}
attributesGrid.attributesGrid(
:item="content.gear.flat[costumeItems[key]]",
)
h3(v-if="label !== 'skip'") {{ label }}
h3(v-else) {{ $t('background') }}
.row.pet-mount-row .row.pet-mount-row
.col-12.col-md-6 .col-12.col-md-6
h2.text-center(v-once) {{ $t('pets') }} h2.text-center(v-once) {{ $t('pets') }}