Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Support position notification at 4 corners.
Tianzhou Chen7efe84c8aadc
diff --git a/frontend/src/bbkit/BBNotification.vue b/frontend/src/bbkit/BBNotification.vueindex 2878c4192d..43d0b20b69 100644--- a/frontend/src/bbkit/BBNotification.vue+++ b/frontend/src/bbkit/BBNotification.vue@@ -1,7 +1,8 @@<template><!-- This example requires Tailwind CSS v2.0+ --><div- class="fixed inset-0 flex items-end justify-center px-4 py-6 pointer-events-none sm:p-6 sm:items-start sm:justify-end"+ class="fixed inset-0 flex px-4 py-6 pointer-events-none sm:p-6"+ :class="placementClass"><!--Notification panel, show/hide based on alert state.@@ -107,7 +108,15 @@<script lang="ts">import { PropType } from "vue";-import { BBNotificationStyle } from "./types";+import { BBNotificationStyle, BBNotificationPlacement } from "./types";++// For <sm breakpoint, we always position it at the center.+const placementClassMap: Map<BBNotificationPlacement, string> = new Map([+ ["TOP_LEFT", "items-start justify-center sm:justify-start"],+ ["TOP_RIGHT", "items-start justify-center sm:justify-end"],+ ["BOTTOM_LEFT", "items-end justify-center sm:justify-start"],+ ["BOTTOM_RIGHT", "items-end justify-center sm:justify-end"],+]);export default {name: "BBNotification",@@ -120,6 +129,10 @@ export default {type: String as PropType<BBNotificationStyle>,default: "INFO",},+ placement: {+ type: String as PropType<BBNotificationPlacement>,+ default: "TOP_RIGHT",+ },title: {type: String,default: "",@@ -130,7 +143,9 @@ export default {},},setup(props, { emit }) {- return {};+ return {+ placementClass: placementClassMap.get(props.placement),+ };},};</script>diff --git a/frontend/src/bbkit/types.ts b/frontend/src/bbkit/types.tsindex 28209c1210..d15ce2d3d4 100644--- a/frontend/src/bbkit/types.ts+++ b/frontend/src/bbkit/types.ts@@ -23,3 +23,8 @@ export type BBStep = {};export type BBNotificationStyle = "INFO" | "SUCCESS" | "WARN" | "CRITICAL";+export type BBNotificationPlacement =+ | "TOP_LEFT"+ | "TOP_RIGHT"+ | "BOTTOM_LEFT"+ | "BOTTOM_RIGHT";