Donate buy modal fix (#9604)

* Added donate back and buy modal

* Fixed login check

* Added ability to remove mustache
This commit is contained in:
Keith Holliday
2017-11-30 08:15:28 -06:00
committed by GitHub
parent d72b40d5b0
commit e321d85b3c
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
<template lang="pug">
.row
buy-gems-modal(v-if='user')
modify-inventory(v-if="isUserLoaded")
footer.col-12(:class="{expanded: isExpandedFooter}")
.row(v-if="isExpandedFooter")
@@ -70,7 +71,10 @@
.row
.col-10 {{ $t('donateText3') }}
.col-2
.btn.btn-contribute
button.btn.btn-contribute(@click="donate()", v-if="user")
.svg-icon.heart(v-html="icons.heart")
.text {{ $t('companyDonate') }}
.btn.btn-contribute(v-else)
a(href='http://habitica.wikia.com/wiki/Contributing_to_Habitica', target='_blank')
.svg-icon.heart(v-html="icons.heart")
.text {{ $t('companyContribute') }}
@@ -369,7 +373,7 @@ export default {
eventAction: 'click',
eventLabel: 'Gems > Donate',
});
this.$root.$emit('bv::show::modal', 'buy-gems');
this.$root.$emit('bv::show::modal', 'buy-gems', {alreadyTracked: true});
},
},
};

View File

@@ -177,6 +177,7 @@ b-modal#avatar-modal(title="", :size='editing ? "lg" : "md"', :hide-header='true
span 5
button.btn.btn-secondary.purchase-all(@click='unlock(`hair.beard.${baseHair5Keys.join(",hair.beard.")}`)') {{ $t('purchaseAll') }}
.col-12.customize-options(v-if='editing')
.head_0.option(@click='set({"preferences.hair.mustache": 0})', :class="[{ active: user.preferences.hair.mustache === 0 }, 'hair_base_0_' + user.preferences.hair.color]")
.option(v-for='option in baseHair6',
:class='{active: option.active, locked: option.locked}')
.base.sprite.customize-option(:class="`hair_mustache_${option.key}_${user.preferences.hair.color}`", @click='option.click')