]> git.ipfire.org Git - pbs.git/commitdiff
frontend: Notification: Support success and danger state
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Jul 2025 13:48:49 +0000 (13:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Jul 2025 13:48:49 +0000 (13:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
frontend/src/components/Notification.vue

index 563799cecbd191d599eed2e0fff50cb0079c0517..4185567cadc6983190d666e276a2f826c9af3e56 100644 (file)
@@ -3,6 +3,8 @@
 
        defineProps<{
                title?: string,
+               isSuccess?: boolean,
+               isDanger?: boolean,
                isClosable?: boolean,
        }>()
 
@@ -11,7 +13,7 @@
 </script>
 
 <template>
-       <div class="notification" v-if="show">
+       <div class="notification" v-if="show" :class="{ 'is-success' : isSuccess, 'is-danger' : isDanger }">
                <button v-if="isClosable" class="delete" @click="show = false"></button>
 
                <!-- Title -->