Files
habitica/website/client/src/components/header/notifications/cardReceived.vue
T
Matteo Pagliazzi 07349c70bc pug to html
2019-10-12 16:33:05 +02:00

42 lines
808 B
Vue

<template>
<base-notification
:can-remove="canRemove"
:has-icon="true"
:notification="notification"
:read-after-click="true"
@click="action"
>
<div
slot="content"
v-html="$t('cardReceived', {card: cardString})"
></div><div
slot="icon"
:class="cardClass"
></div>
</base-notification>
</template>
<script>
import BaseNotification from './base';
export default {
components: {
BaseNotification,
},
props: ['notification', 'canRemove'],
computed: {
cardString () {
return this.$t(`${this.notification.data.card}Card`);
},
cardClass () {
return `notif_inventory_special_${this.notification.data.card}`;
},
},
methods: {
action () {
this.$router.push({ name: 'items' });
},
},
};
</script>