Files
habitica/website/client/components/achievements/wonChallenge.vue
Keith Holliday 36a933d0c4 Client fixed sept 4 (#9019)
* Fixed background purchasing

* Added challenge export

* Fixed is leader filter

* Fixed staff icon

* Add block to profile modal

* Added initial send gems modal

* Added modal stack

* Fixed lint issues

* Updated notification styles

* Updated level up styles

* Fixed many achievement styles

* Fixed notification navigate to same route with different param

* Added mark chat seen and remove new messages

* Added scroll to notifications

* Updated hall loading
2017-09-05 12:34:00 -06:00

69 lines
1.8 KiB
Vue

<template lang="pug">
b-modal#won-challenge(:title="$t('wonChallenge')", size='md', :hide-footer="true")
.modal-body.text-center
h4(v-markdown='user.achievements.challenges[user.achievements.challenges.length - 1]')
.row
.col-4
.achievement-karaoke-2x
.col-4
// @TODO: +generatedAvatar({sleep: false})
avatar.avatar(:member='user', :avatar-only='true')
.col-4
.achievement-karaoke-2x
p {{ $t('congratulations') }}
br
button.btn.btn-primary(@click='close()') {{ $t('hurray') }}
.modal-footer
.col-3
a.twitter-share-button(href='https://twitter.com/intent/tweet?text=#{tweet}&via=habitica&url=#{env.BASE_URL}/social/won-challenge&count=none') {{ $t('tweet') }}
.col-4(style='margin-left:.8em')
.fb-share-button(data-href='#{env.BASE_URL}/social/won-challenge', data-layout='button')
.col-4(style='margin-left:.8em')
a.tumblr-share-button(data-href='#{env.BASE_URL}/social/won-challenge', data-notes='none')
</template>
<style scoped>
.achievement-karaoke-2x {
margin: 0 auto;
margin-top: 6em;
}
.avatar {
width: 140px;
margin: 0 auto;
margin-bottom: 1.5em;
margin-top: 1.5em;
}
</style>
<script>
import { mapState } from 'client/libs/store';
import bModal from 'bootstrap-vue/lib/components/modal';
import markdownDirective from 'client/directives/markdown';
import Avatar from '../avatar';
export default {
components: {
bModal,
Avatar,
},
directives: {
markdown: markdownDirective,
},
computed: {
...mapState({user: 'user.data'}),
},
data () {
let tweet = this.$t('wonChallengeShare');
return {
tweet,
};
},
methods: {
close () {
this.$root.$emit('hide::modal', 'won-challenge');
},
},
};
</script>