Skip to content

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

chore: tweak `BBButtonConfirm` icon (#15839)

boojack427a18103e66
diff --git a/frontend/src/bbkit/BBButtonConfirm.vue b/frontend/src/bbkit/BBButtonConfirm.vue
index e3280c1b40..47a050b410 100644
--- a/frontend/src/bbkit/BBButtonConfirm.vue
+++ b/frontend/src/bbkit/BBButtonConfirm.vue
@@ -15,15 +15,9 @@
"
>
<template v-if="!hideIcon">
- <heroicons-outline:trash v-if="type == 'DELETE'" class="w-4 h-4" />
- <heroicons-outline:archive v-if="type == 'ARCHIVE'" class="w-4 h-4" />
- <heroicons-outline:reply v-if="type == 'RESTORE'" class="w-4 h-4" />
- <heroicons-outline:minus-circle
- v-if="type == 'DISABLE'"
- class="w-4 h-4"
- />
- <heroicons-outline:pencil v-if="type == 'EDIT'" class="w-4 h-4" />
- <heroicons-outline:duplicate v-if="type == 'CLONE'" class="w-4 h-4" />
+ <Trash2Icon v-if="type == 'DELETE'" class="w-4 h-4" />
+ <ArchiveIcon v-if="type == 'ARCHIVE'" class="w-4 h-4" />
+ <Undo2Icon v-if="type == 'RESTORE'" class="w-4 h-4" />
</template>
<span v-if="buttonText" :class="[!hideIcon && 'ml-1']">
{{ buttonText }}
@@ -31,11 +25,7 @@
</NButton>
<BBAlert
v-model:show="state.showModal"
- :type="
- type == 'DELETE' || type == 'ARCHIVE' || type == 'DISABLE'
- ? 'warning'
- : 'info'
- "
+ :type="type == 'DELETE' || type == 'ARCHIVE' ? 'warning' : 'info'"
:ok-text="okText"
:title="confirmTitle"
:description="confirmDescription"
@@ -52,6 +42,7 @@
</template>
<script lang="ts" setup>
+import { ArchiveIcon, Trash2Icon, Undo2Icon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/bbkit/types.ts b/frontend/src/bbkit/types.ts
index f91885c445..59fb44d2dc 100644
--- a/frontend/src/bbkit/types.ts
+++ b/frontend/src/bbkit/types.ts
@@ -8,14 +8,7 @@ export type BBButtonType =
| "DANGER"
| "SUCCESS";
-export type BBButtonConfirmType =
- | "NORMAL"
- | "DELETE"
- | "ARCHIVE"
- | "RESTORE"
- | "DISABLE"
- | "EDIT"
- | "CLONE";
+export type BBButtonConfirmType = "NORMAL" | "DELETE" | "ARCHIVE" | "RESTORE";
export type BBTableColumn = {
title: string;
diff --git a/frontend/src/components/EnvironmentForm/Form.vue b/frontend/src/components/EnvironmentForm/Form.vue
index 8ba3fe5ba2..33252323bb 100644
--- a/frontend/src/components/EnvironmentForm/Form.vue
+++ b/frontend/src/components/EnvironmentForm/Form.vue
@@ -112,7 +112,7 @@
>
<BBButtonConfirm
v-if="allowArchive"
- :type="'ARCHIVE'"
+ :type="'DELETE'"
:button-text="$t('environment.delete')"
:ok-text="$t('common.delete')"
:confirm-title="
@@ -207,12 +207,9 @@ const hasEnvironmentPolicyFeature = computed(() =>
);
const allowArchive = computed(() => {
- return (
- hasPermission("bb.settings.set") && environmentList.value.length > 1
- );
+ return hasPermission("bb.settings.set") && environmentList.value.length > 1;
});
-
const renderColorPicker = () => {
return (
<NColorPicker