Files
habitica/website/client/components/achievements/questInvitation.vue
Keith Holliday 0233f7b486 More fixes (#8988)
* Links stay white on hover

* Fixed task icon color

* Disabled plus button when needed

* Fixed difficulty color

* Fixed task reward color

* Updated create styles

* Fixed group plan link

* Fixed second group test modal

* Added login incentives

* Fixed group notification clear

* Show baily correctly

* Styled armoire notification

* Fixed contributor achievement styles

* Fixed death

* Fixed drop styles

* Fixed invited friend modal

* Fixed joined challenge achievement style

* Fixed joined guild style

* Fixed level up styles

* Updated low health styles

* Fixed bailey styles

* Updated quest completed

* Added soem conditionals to hide modals

* Added rebirth styles

* Fixed rebirth enable styles

* Fixed streak styles

* Fixed testing modals

* Fixed ultimate gear achievement

* Fixed won challenge

* Set user to welcomed if created on mobile

* Removed old default tasks

* Began adding more options to avatar

* Added change class

* Inbox to messages

* Moved profile to menu

* Added user modal for viewing a user and send message

* Fixed conversations

* Fixed lint

* Fixed challenges sending to server

* Added challenge progress view

* Fixed group sync after pay

* Fixed some group accepting features

* Fixed initial chat loading

* Fixed some exitence errors

* Added user names to assigned

* Added upgrade link

* Began adding new payment flow

* Added default tasks

* Updated avatar styles

* Updated tutorial styles

* Rebuilt notifications and styles

* Updated upload script

* Fixed lint

* Added default tasks back to mobile and added updated tests

* More test fixes
2017-08-25 20:56:21 -06:00

93 lines
3.0 KiB
Vue

<template lang="pug">
b-modal#quest-invitation(v-if='user.party.quest.key', :title="$t('questInvitation')", size='lg', :hide-footer="true")
.modal-header
h4 {{ $t('questInvitation') }}
|&nbsp;{{quests[user.party.quest.key].text()}}
.modal-body
.pull-right-sm.text-center
.col-centered(:class='`quest_${quests[user.party.quest.key].key}`')
div(ng-if='quests[user.party.quest.key].boss')
h4 {{quests[user.party.quest.key].boss.name()}}
p
strong {{ $t('bossHP') }} + ': '
| {{quests[user.party.quest.key].boss.hp}}
p
strong {{ $t('bossStrength') }} + ': '
| {{quests[user.party.quest.key].boss.str}}
div(ng-if='quests[user.party.quest.key].collect')
p(ng-repeat='(k,v) in quests[user.party.quest.key].collect')
strong {{ $t('collect') }} + ': '
| {{quests[user.party.quest.key].collect[k].count}} {{quests[user.party.quest.key].collect[k].text()}}
div(ng-bind-html='quests[user.party.quest.key].notes()')
.quest-rewards(:key='user.party.quest.key', header-participant="$t('rewardsAllParticipants')", header-quest-owner="$t('rewardsQuestOwner')")
hr
h5 {{headerParticipant}}
table.table.table-striped
tr(ng-repeat='drop in _.reject(quest.drop.items, \'onlyOwner\')')
td {{drop.text()}}
tr(ng-if='quest.drop.exp > 0')
td {{quest.drop.exp}}&nbsp;
| {{ $t('experience') }}
tr(ng-if='quest.drop.gp > 0')
td {{quest.drop.gp}}&nbsp;
| {{ $t('gold') }}
tr(ng-if='quest.drop.unlock()')
td {{quest.drop.unlock()}}
div(ng-if='getQuestOwnerRewards(quest).length > 0')
h5 {{headerQuestOwner}}
table.table.table-striped
tr(ng-repeat='drop in getQuestOwnerRewards(quest)')
td {{drop.text()}}
.modal-footer
button.btn.btn-default(ng-click='questHold = true; $close()') {{ $t('askLater') }}
button.btn.btn-default(ng-click='questReject(); $close()') {{ $t('reject') }}
button.btn.btn-primary(ng-click='questAccept(); $close()') {{ $t('accept') }}
</template>
<style scope>
.dont-despair, .death-penalty {
margin-top: 1.5em;
}
</style>
<script>
import bModal from 'bootstrap-vue/lib/components/modal';
import quests from 'common/script/content/quests';
import Avatar from '../avatar';
import { mapState } from 'client/libs/store';
import revive from '../../../common/script/ops/revive';
import percent from '../../../common/script/libs/percent';
import {maxHealth} from '../../../common/script/index';
export default {
components: {
bModal,
Avatar,
},
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', 'death');
},
revive () {
// @TODO: Post
revive(this.user);
},
},
};
</script>