2020-05-11 18:22:23 +00:00
|
|
|
<template>
|
2020-08-16 13:41:43 +00:00
|
|
|
<div class="bot-alerts">
|
2020-05-11 18:22:23 +00:00
|
|
|
<b-alert
|
2022-04-15 16:08:41 +00:00
|
|
|
v-for="(alert, index) in alertStore.activeMessages"
|
2020-08-31 15:43:44 +00:00
|
|
|
:key="index"
|
2020-05-11 18:22:23 +00:00
|
|
|
variant="warning"
|
|
|
|
dismissible
|
|
|
|
:show="5"
|
|
|
|
:value="!!alert.message"
|
2022-04-15 16:08:41 +00:00
|
|
|
@dismissed="alertStore.removeAlert"
|
2020-05-11 18:22:23 +00:00
|
|
|
>
|
|
|
|
{{ alert.message }}
|
|
|
|
</b-alert>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2020-08-09 13:19:16 +00:00
|
|
|
<script lang="ts">
|
2022-04-15 16:08:41 +00:00
|
|
|
import { defineComponent } from '@vue/composition-api';
|
|
|
|
import { useAlertsStore } from '@/stores/alerts';
|
2020-05-11 18:22:23 +00:00
|
|
|
|
2022-04-15 16:08:41 +00:00
|
|
|
export default defineComponent({
|
|
|
|
name: 'BotAlerts',
|
|
|
|
setup() {
|
|
|
|
const alertStore = useAlertsStore();
|
|
|
|
return {
|
|
|
|
alertStore,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
2020-05-11 18:22:23 +00:00
|
|
|
</script>
|