Files
habitica/website/client/components/inventory/stable/hatchedPetDialog.vue
negue 4108a22d78 [WIP] bootstrap-vue upgrade (#9178)
* update bootstrap-vue to 1.0.0-beta.9 - remove all individual bootstrap components and use BootstrapVue into Vue

* change modal action names from show::modal to bv::show::modal

* check if drops are undefined

* fix modal widths - sellModal now using input instead of dropbox

* upgrade to bootstrap 4.0beta

* include package-lock changes

* fix app menu dropdown position

* upgrade bootstrap to beta2 (was missing grid offset and other fixes) - refix header menu position

* fix tags popup (auto width to max not working) - fix filter panel width (adding width: 100% works until max-width)

* show hide logo on different screensize (new css breakpoints - http://getbootstrap.com/docs/4.0/utilities/display/ )

* fix package-lock?

* fix active button style / app header toggle button

* fix package-lock !

* update package lock after merge - new mixin "openedItemRows" to save the "show more/show less" in stable

* mixin naming style

* fix buyQuestModal marginTop

* fix customMenuDropdown position

* fix userDropdown items
2017-11-08 18:40:37 +01:00

105 lines
1.9 KiB
Vue

<template lang="pug">
b-modal#hatchedPet-modal(
:hide-header="true"
)
div.content(v-if="pet != null")
div.dialog-header.title(v-once) {{ $t('hatchedPetGeneric') }}
div.inner-content
div.pet-background
div(:class="pet.class")
h4.title {{ pet.name }}
div.text(v-if="!hideText", v-markdown="$t('hatchedPetHowToUse')")
button.btn.btn-primary(@click="close()") {{ $t('onward') }}
div.clearfix(slot="modal-footer")
</template>
<style lang="scss">
@import '~client/assets/scss/colors.scss';
@import '~client/assets/scss/modal.scss';
#hatchedPet-modal {
@include centeredModal();
.modal-dialog {
width: 330px;
}
.content {
text-align: center;
}
.inner-content {
margin: 24px auto auto;
display: flex;
flex-direction: column;
align-items: center;
}
.pet-background {
width: 112px;
height: 112px;
border-radius: 4px;
background-color: $gray-700;
}
.Pet {
margin: auto;
}
.dialog-header {
color: $purple-200;
}
}
</style>
<script>
import markdownDirective from 'client/directives/markdown';
export default {
data () {
return {
pet: null,
};
},
directives: {
markdown: markdownDirective,
},
created () {
},
mounted () {
this.$root.$on('hatchedPet::open', this.openDialog);
},
destroyed () {
this.$root.$off('hatchedPet::open', this.openDialog);
},
methods: {
openDialog (item) {
this.pet = item;
this.$root.$emit('bv::show::modal', 'hatchedPet-modal');
},
close () {
this.$emit('closed', this.item);
this.$root.$emit('bv::hide::modal', 'hatchedPet-modal');
this.pet = null;
},
},
props: {
hideText: {
type: Boolean,
},
},
};
</script>