mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
introduce notification type
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
<template>
|
||||
<div class="new-notification rounded" v-if="store.visible">
|
||||
<div>{{ store.text }}</div>
|
||||
<div
|
||||
class="new-notif rounded"
|
||||
:class="{ 'notif-error': notif.type == NotificationType.Error }"
|
||||
v-if="notif.visible"
|
||||
>
|
||||
<div>{{ notif.text }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useNotificationStore } from "../stores/notification";
|
||||
const store = useNotificationStore();
|
||||
import { useNotificationStore, NotificationType } from "../stores/notification";
|
||||
|
||||
const notif = useNotificationStore();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.new-notification {
|
||||
.new-notif {
|
||||
position: fixed;
|
||||
z-index: 2000;
|
||||
width: 25rem;
|
||||
@@ -26,4 +31,8 @@ const store = useNotificationStore();
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.notif-error {
|
||||
background-color: $red;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user