Chatwoot/app/javascript/dashboard/components/Snackbar.vue
Ximena Sandoval cab5a3e53b
chore: Add a redirect link to the conversation in success toast message (#3711)
When creating a conversation from the contacts tab now we can go directly to the conversation by clicking the link in the success message

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2022-01-13 11:15:40 -08:00

38 lines
705 B
Vue

<template>
<div>
<div class="ui-snackbar">
<div class="ui-snackbar-text">
{{ message }}
</div>
<div v-if="action" class="ui-snackbar-action">
<router-link v-if="action.type == 'link'" :to="action.to">
{{ action.message }}
</router-link>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
message: { type: String, default: '' },
action: {
type: Object,
default: () => {},
},
showButton: Boolean,
duration: {
type: [String, Number],
default: 3000,
},
},
data() {
return {
toggleAfterTimeout: false,
};
},
mounted() {},
methods: {},
};
</script>