Files
habitica/website/client/components/achievements/wonChallenge.vue
T
Keith Holliday 5995dd235d New client more updates (#8934)
* Added api token to page

* Fixed wiki link

* Added categoires

* Removed extra create challenge button. Add prize model and user balance deduction

* Added pending filter

* Added member sort

* Added confirmation for leaving

* Filtered tavern

* Added redirect to newly created guild

* Made guild links routerlinks

* Fixed wiki link and added fetch recent messages

* Show backgrounds only on edit. Fixed glasses equip

* Added link to register page

* Added yesterdailies

* Added achievement footer

* Update guild badges

* Added avatar to achievement avatar component

* More guild crests updates

* Achievement footer and avatar added

* Added notification read

* Removed duplicate string
2017-08-09 10:56:48 -06:00

76 lines
2.5 KiB
Vue

<template lang="pug">
b-modal#won-challenge(:title="$t('guildReminderTitle')", size='lg', :hide-footer="true")
.modal-content(style='min-width:28em')
.modal-body.text-center
h3(style='margin-bottom: 0') {{ $t('wonChallenge') }}
h4(v-markdown='user.achievements.challenges[user.achievements.challenges.length - 1]')
.container-fluid
.row(style='margin-bottom:1em')
.col-4(style='padding:0')
.container-fluid
.row
.col-4(style='padding:0')
.col-4(style='padding:0')
.achievement-karaoke-2x(style='margin-top: 2em')
.col-4(style='padding:0')
.herobox(style='padding:0; width:0; height:7em')
.character-sprites(style='width:0')
// @TODO: +generatedAvatar({sleep: false})
avatar(:member='user')
.col-4(style='padding:0')
.container-fluid
.row
.col-4(style='padding:0')
.col-4(style='padding:0')
.achievement-karaoke-2x(style='margin-top: 2em')
p {{ $t('congratulations') }}
br
button.btn.btn-primary(@click='close()') {{ $t('hurray') }}
.modal-footer(style='margin-top:0', ng-init='loadWidgets()')
.container-fluid
.row
.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 scope>
.dont-despair, .death-penalty {
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>