From 5b8851b6c268d0e93c158908fbfae9f8473db5ff Mon Sep 17 00:00:00 2001
From: Orangerot <purple@orangerot.dev>
Date: Wed, 19 Jun 2024 00:14:49 +0200
Subject: Initial commit

---
 pse-dashboard/src/components/ErrorLog.vue | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 pse-dashboard/src/components/ErrorLog.vue

(limited to 'pse-dashboard/src/components/ErrorLog.vue')

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>
+
-- 
cgit v1.2.3

