Skip to content

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

Remove BBModal and BBAlert showing property, can use v-if

Tianzhou Chenbd2752836153
diff --git a/frontend/src/bbkit/BBAlert.vue b/frontend/src/bbkit/BBAlert.vue
index 0fa1c4cd6a..a3cd306b7e 100644
--- a/frontend/src/bbkit/BBAlert.vue
+++ b/frontend/src/bbkit/BBAlert.vue
@@ -1,6 +1,6 @@
<template>
<!-- This example requires Tailwind CSS v2.0+ -->
- <div v-if="showing" class="fixed z-10 inset-0 overflow-y-auto">
+ <div class="fixed z-10 inset-0 overflow-y-auto">
<div
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
>
@@ -166,10 +166,6 @@ export default {
name: "BBAlert",
emits: ["ok", "cancel"],
props: {
- showing: {
- required: true,
- type: Boolean,
- },
style: {
default: Object as PropType<"INFO" | "SUCCESS" | "WARN" | "CRITICAL">,
type: String,
diff --git a/frontend/src/bbkit/BBModal.vue b/frontend/src/bbkit/BBModal.vue
index be6b1bb152..a380504b1e 100644
--- a/frontend/src/bbkit/BBModal.vue
+++ b/frontend/src/bbkit/BBModal.vue
@@ -3,7 +3,6 @@
-->
<template>
<div
- v-if="showing"
class="fixed inset-0 w-full h-screen flex items-center justify-center z-50"
@click.self="closeIfShown"
style="background-color: rgba(209, 213, 219, 0.8)"
@@ -53,10 +52,6 @@ import { onMounted } from "vue";
export default {
name: "BBModal",
props: {
- showing: {
- required: true,
- type: Boolean,
- },
title: {
required: true,
type: String,
diff --git a/frontend/src/views/EnvironmentDashboard.vue b/frontend/src/views/EnvironmentDashboard.vue
index 7e39fb6efa..0398c2387b 100644
--- a/frontend/src/views/EnvironmentDashboard.vue
+++ b/frontend/src/views/EnvironmentDashboard.vue
@@ -19,7 +19,7 @@
</BBTab>
</div>
<BBModal
- :showing="state.showCreateModal"
+ v-if="state.showCreateModal"
:title="'Create Environment'"
@close="state.showCreateModal = false"
>
diff --git a/frontend/src/views/EnvironmentDetail.vue b/frontend/src/views/EnvironmentDetail.vue
index dfc5bdf65e..97560e0693 100644
--- a/frontend/src/views/EnvironmentDetail.vue
+++ b/frontend/src/views/EnvironmentDetail.vue
@@ -6,7 +6,7 @@
@delete="state.showDeleteModal = true"
/>
<BBAlert
- :showing="state.showDeleteModal"
+ v-if="state.showDeleteModal"
:style="'CRITICAL'"
:okText="'Delete'"
:title="
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index b3ff8bb66c..184ddc088f 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -274,7 +274,7 @@ input[type="number"] {
</div>
</form>
<BBAlert
- :showing="state.showDeleteModal"
+ v-if="state.showDeleteModal"
:style="'CRITICAL'"
:okText="'Delete'"
:title="'Delete instance \'' + state.instance.attributes.name + '\' ?'"
@@ -288,7 +288,7 @@ input[type="number"] {
>
</BBAlert>
<BBAlert
- :showing="state.showCancelModal"
+ v-if="state.showCancelModal"
:style="'WARN'"
:okText="'Discard'"
:cancelText="'No'"