Files
habitica/website/client/components/shops/quests/questDialogContent.vue
negue 0b0baf2195 new client misc fixes (#9033)
* show quests and open quest dialog on click

* extract questDialogContent/Drops to separate components & use those in startQuestModal & buyQuestModal

* fix market search

* remove & readd pinned gear on revive

* remove listener once destroyed
2017-09-16 23:09:31 +02:00

66 lines
1.1 KiB
Vue

<template lang="pug">
div.quest-content
.quest-image(:class="'quest_' + item.key")
h4.title {{ itemText }}
div.text(v-html="itemNotes")
questInfo.questInfo(:quest="item")
</template>
<style lang="scss" scoped>
@import '~client/assets/scss/colors.scss';
.quest-image {
margin: 0 auto;
margin-bottom: 1em;
margin-top: 1.5em;
}
.text {
max-height: 220px;
margin-bottom: 8px;
overflow-y: scroll;
text-overflow: ellipsis;
}
.questInfo {
width: 70%;
margin: 0 auto;
margin-bottom: 10px;
}
</style>
<script>
import QuestInfo from './questInfo.vue';
export default {
components: {
QuestInfo,
},
computed: {
itemText () {
if (this.item.text instanceof Function) {
return this.item.text();
} else {
return this.item.text;
}
},
itemNotes () {
if (this.item.notes instanceof Function) {
return this.item.notes();
} else {
return this.item.notes;
}
},
},
props: {
item: {
type: Object,
},
},
};
</script>