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"
|
2022-11-30 18:26:06 +00:00
|
|
|
v-model="alert.timeout"
|
2022-12-05 05:54:06 +00:00
|
|
|
:variant="alert.severity ?? 'warning'"
|
2020-05-11 18:22:23 +00:00
|
|
|
dismissible
|
2022-11-30 18:26:06 +00:00
|
|
|
@closed="alertStore.removeAlert(alert)"
|
|
|
|
>{{ alert.message }}</b-alert
|
2020-05-11 18:22:23 +00:00
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-11-30 18:26:06 +00:00
|
|
|
<script setup lang="ts">
|
2022-04-15 16:08:41 +00:00
|
|
|
import { useAlertsStore } from '@/stores/alerts';
|
2022-11-30 18:26:06 +00:00
|
|
|
const alertStore = useAlertsStore();
|
2020-05-11 18:22:23 +00:00
|
|
|
</script>
|