ffplayout/frontend/components/AlertMsg.vue

34 lines
1.2 KiB
Vue
Raw Permalink Normal View History

2024-04-04 17:28:25 -04:00
<template>
<div
v-if="indexStore.showAlert"
role="alert"
class="alert fixed top-20 right-3 z-40 w-auto min-w-64 max-w-[90%] md:max-w-[50%] xl:max-w-[40%]"
:class="`alert-${indexStore.alertVariant}`"
>
2024-04-09 15:08:25 -04:00
<SvgIcon :name="indexStore.alertVariant" />
{{ indexStore.alertMsg }}
</div>
<!-- HACK: init alerts to get the right colors, can be remove when bug is fixed -->
<div class="alert alert-success w-auto max-w-[700px] justify-start py-2 rounded hidden">
2024-04-09 15:08:25 -04:00
<SvgIcon name="success" />
<span class="truncate w-full">bla bla bla</span>
</div>
<div class="alert alert-warning w-auto max-w-[700px] justify-start py-2 rounded hidden">
2024-04-09 15:08:25 -04:00
<SvgIcon name="warning" />
<span class="truncate w-full">bla bla bla</span>
</div>
<div class="alert alert-info w-auto max-w-[700px] justify-start py-2 rounded hidden">
2024-04-09 15:08:25 -04:00
<SvgIcon name="info" />
<span class="truncate w-full">bla bla bla</span>
</div>
<div class="alert alert-error w-auto max-w-[700px] justify-start py-2 rounded hidden">
2024-04-09 15:08:25 -04:00
<SvgIcon name="error" />
<span class="truncate w-full">bla bla bla</span>
</div>
2024-04-04 17:28:25 -04:00
</template>
<script setup lang="ts">
const indexStore = useIndex()
</script>