Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Support closing notification actively

Tianzhou Chen2ae58500b063
diff --git a/frontend/src/bbkit/BBNotification.vue b/frontend/src/bbkit/BBNotification.vue
index 43d0b20b69..9c7e9f63b9 100644
--- a/frontend/src/bbkit/BBNotification.vue
+++ b/frontend/src/bbkit/BBNotification.vue
@@ -99,6 +99,28 @@
{{ description }}
</p>
</div>
+ <div class="ml-4 flex-shrink-0 flex">
+ <button
+ class="bg-white rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none"
+ @click.prevent="$emit('close', payload)"
+ >
+ <span class="sr-only">Close</span>
+ <!-- Heroicon name: solid/x -->
+ <svg
+ class="h-5 w-5"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
+ clip-rule="evenodd"
+ />
+ </svg>
+ </button>
+ </div>
</div>
</div>
</div>
@@ -120,6 +142,7 @@ const placementClassMap: Map<BBNotificationPlacement, string> = new Map([
export default {
name: "BBNotification",
+ emits: ["close"],
props: {
showing: {
type: Boolean,
@@ -141,6 +164,8 @@ export default {
type: String,
default: "",
},
+ // Any payload pass through to "close" events
+ payload: {},
},
setup(props, { emit }) {
return {