Files
habitica/website/client/src/mixins/petMixin.js
T
Matteo Pagliazzi e0e9811ab6 lint common
2019-10-09 20:08:36 +02:00

17 lines
453 B
JavaScript

import notifications from './notifications';
export default {
mixins: [notifications],
methods: {
closeHatchPetDialog () {
this.$root.$emit('bv::hide::modal', 'hatching-modal');
},
hatchPet (pet) {
this.closeHatchPetDialog();
this.$store.dispatch('common:hatch', { egg: pet.eggKey, hatchingPotion: pet.potionKey });
this.text(this.$t('hatchedPet', { egg: pet.eggName, potion: pet.potionName }));
},
},
};