mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
* 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
49 lines
1.4 KiB
Vue
49 lines
1.4 KiB
Vue
<template lang="pug">
|
|
b-modal#quest-completed(v-if='user.party.quest.completed', :title="quests[user.party.quest.completed].text() + '' + $t('completed')",
|
|
size='lg', :hide-footer="true")
|
|
.modal-body.text-center
|
|
div(:class='`quest_${user.party.quest.completed}`')
|
|
p(v-html='quests[user.party.quest.completed].completion()')
|
|
.quest-rewards(key='user.party.quest.completed', header-participant="$t('youReceived')", header-quest-owner="$t('questOwnerReceived')")
|
|
.modal-footer
|
|
button.btn.btn-primary(@click='setQuestCompleted()') {{ $t('ok') }}
|
|
</template>
|
|
|
|
<script>
|
|
import bModal from 'bootstrap-vue/lib/components/modal';
|
|
import quests from 'common/script/content/quests';
|
|
|
|
import { mapState } from 'client/libs/store';
|
|
import percent from '../../../common/script/libs/percent';
|
|
import { maxHealth } from '../../../common/script/index';
|
|
|
|
export default {
|
|
components: {
|
|
bModal,
|
|
},
|
|
data () {
|
|
return {
|
|
maxHealth,
|
|
quests,
|
|
};
|
|
},
|
|
computed: {
|
|
...mapState({user: 'user.data'}),
|
|
barStyle () {
|
|
return {
|
|
width: `${percent(this.user.stats.hp, maxHealth)}%`,
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
close () {
|
|
this.$root.$emit('hide::modal', 'quest-completed');
|
|
},
|
|
setQuestCompleted () {
|
|
this.$store.dispatch('user:set', {'party.quest.completed': ''});
|
|
this.close();
|
|
},
|
|
},
|
|
};
|
|
</script>
|