summaryrefslogtreecommitdiff
path: root/pse-dashboard/src/components/ErrorLog.vue
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-06-19 00:14:49 +0200
committerOrangerot <purple@orangerot.dev>2024-06-27 12:11:14 +0200
commit5b8851b6c268d0e93c158908fbfae9f8473db5ff (patch)
tree7010eb85d86fa2da06ea4ffbcdb01a685d502ae8 /pse-dashboard/src/components/ErrorLog.vue
Initial commitHEADmain
Diffstat (limited to 'pse-dashboard/src/components/ErrorLog.vue')
-rw-r--r--pse-dashboard/src/components/ErrorLog.vue36
1 files changed, 36 insertions, 0 deletions
diff --git a/pse-dashboard/src/components/ErrorLog.vue b/pse-dashboard/src/components/ErrorLog.vue
new file mode 100644
index 0000000..3c36359
--- /dev/null
+++ b/pse-dashboard/src/components/ErrorLog.vue
@@ -0,0 +1,36 @@
+<script setup>
+import { Logger } from '@/logger.js'
+
+const icon = {
+ success: "fa-trophy",
+ info: "fa-circle-exclamation",
+ warning: "fa-triangle-exclamation",
+ danger: "fa-fire",
+};
+
+</script>
+<template>
+ <div class="row">
+ <div class="col-sm-12 col-md-6 col-lg-5 position-fixed bottom-0 end-0 my-1">
+ <div
+ v-for="(item, index) in Logger.items"
+ :key="index"
+ class="alert alert-dismissible d-flex align-items-center"
+ :class="'alert-' + item.type"
+ >
+ <button
+ type="button"
+ class="btn-close"
+ @click="Logger.delete(item)"
+ />
+ <i
+ class="fs-3 me-3 fa"
+ :class="icon[item.type]"
+ /> {{ item.message }}
+ </div>
+ </div>
+ </div>
+</template>
+<style scoped>
+</style>
+