mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
* 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
66 lines
1.1 KiB
Vue
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>
|