Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: deprecate some bbkits (#9997)
ecmadao00a36e5d0d3d
diff --git a/frontend/src/bbkit/BBOutline.vue b/frontend/src/bbkit/BBOutline.vuedeleted file mode 100644index 0dd38a0feb..0000000000--- a/frontend/src/bbkit/BBOutline.vue+++ /dev/null@@ -1,144 +0,0 @@-<template>- <div- class="outline-title group flex py-1"- :class="dynamicItemClass()"- @click.prevent="toggleCollapse"- @mouseenter="state.hoverTitle = true"- @mouseleave="state.hoverTitle = false"- >- <span :class="'pl-' + 2 * (level + 1)">{{ title }}</span>- <template v-if="allowCollapse && state.hoverTitle">- <svg- v-if="collapseState"- class="mr-2 h-4 w-4 transform group-hover:text-gray-400 group-focus:text-gray-400 transition-colors ease-in-out duration-150"- viewBox="0 0 20 20"- >- <path d="M6 6L14 10L6 14V6Z" fill="currentColor" />- </svg>- <svg- v-else- class="mr-2 h-4 w-4 transform rotate-90 group-hover:text-gray-400 group-focus:text-gray-400 transition-colors ease-in-out duration-150"- viewBox="0 0 20 20"- >- <path d="M6 6L14 10L6 14V6Z" fill="currentColor" />- </svg>- </template>- </div>- <div v-if="!allowCollapse || !collapseState">- <div- v-for="(item, index) in itemList"- :key="index"- role="group"- @mouseenter="state.hoverIndex = index"- @mouseleave="state.hoverIndex = -1"- >- <BBOutline- v-if="item.childList"- :id="[id, item.id].join('.')"- :title="item.name"- :item-list="item.childList"- :allow-collapse="item.childCollapse"- :level="level + 1"- :outline-item-class="outlineItemClass"- />- <router-link- v-else-if="item.link"- :to="item.link"- class="outline-item group flex justify-between pr-1 py-1"- :class="['pl-' + (4 + level * 3), outlineItemClass]"- >- <div class="flex flex-row justify-start items-center truncate">- <component :is="item.prefix" v-if="item.prefix" class="mr-1" />- <span class="truncate" :title="item.name">{{ item.name }}</span>- </div>- <button- v-if="allowDelete && index == state.hoverIndex"- class="focus:outline-none"- @click.prevent="$emit('delete-index', index)"- >- <heroicons-solid:x class="w-4 h-4 hover:text-control-hover" />- </button>- </router-link>- <span v-else class="pl-1 py-1 truncate" :title="item.name">{{- item.name- }}</span>- </div>- </div>-</template>--<script lang="ts" setup>-import { computed, reactive, withDefaults } from "vue";-import { useUIStateStore } from "@/store";-import { BBOutlineItem } from "./types";--interface LocalState {- hoverIndex: number;- hoverTitle: boolean;- collapseState: boolean;-}--const props = withDefaults(- defineProps<{- // Used for storing the collapse state.- // Empty id means not to store collapse state.- id?: string;- title: string;- itemList: BBOutlineItem[];- allowDelete?: boolean;- allowCollapse?: boolean;- level?: number;- outlineItemClass?: string;- }>(),- {- id: "",- allowDelete: false,- allowCollapse: false,- level: 0,- outlineItemClass: "",- }-);--defineEmits<{- (event: "delete-index", index: number): void;-}>();--const uiStateStore = useUIStateStore();--const state = reactive<LocalState>({- hoverIndex: -1,- hoverTitle: false,- collapseState: true,-});--const collapseState = computed(() => {- if (props.id) {- return uiStateStore.getCollapseStateByKey(props.id);- }- return state.collapseState;-});--const toggleCollapse = () => {- if (props.allowCollapse) {- if (props.id) {- const newState = !collapseState.value;- uiStateStore.saveCollapseStateByKey({- key: props.id,- collapse: newState,- });- } else {- state.collapseState = !state.collapseState;- }- }-};--const dynamicItemClass = () => {- const list = [];- if (props.level == 0) {- list.push("toplevel");- }- if (props.allowCollapse) {- list.push("collapsible");- }- return list.join(" ");-};-</script>diff --git a/frontend/src/bbkit/BBProgressPie.vue b/frontend/src/bbkit/BBProgressPie.vuedeleted file mode 100644index 2e0bf85f28..0000000000--- a/frontend/src/bbkit/BBProgressPie.vue+++ /dev/null@@ -1,74 +0,0 @@-<template>- <div class="relative flex justify-center items-center">- <svg :viewBox="viewBox" class="absolute inset-0 z-0">- <path- class="stroke-control-bg"- fill="none"- :stroke-width="thickness + 1"- d="M18 2.0854 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"- />- <path- class="duration-100 ease-out"- fill="none"- stroke="currentColor"- stroke-linecap="round"- :stroke-width="thickness"- :stroke-dasharray="strokeDasharray"- d="M18 2.0854 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"- />- </svg>- <slot name="default" :percent="displayPercent">- {{ displayPercent }}%- </slot>- </div>-</template>--<script lang="ts" setup>-import { computed, withDefaults } from "vue";--/**- * [Learn more](https://medium.com/@pppped/how-to-code-a-responsive-circular-percentage-chart-with-svg-and-css-3632f8cd7705)- */--const props = withDefaults(- defineProps<{- percent?: number; // range: [0, 100]- thickness?: number; // min value: 1- }>(),- {- percent: 0,- thickness: 3, // Can't extract a constant value here due to vue's compiler limitations- }-);--const viewBox = computed(() => {- const offset = Math.max(props.thickness - 3, 0); // 3 is the default value of thickness- const vb = {- minX: 0 - offset,- minY: 0 - offset,- width: 36 + offset * 2,- height: 36 + offset * 2,- };- return [vb.minX, vb.minY, vb.width, vb.height].join(" ");-});--const displayPercent = computed(() => {- const { percent } = props;- if (percent >= 100) return 100;- if (percent <= 0) return 0;- if (percent >= 99 && percent < 100) return 99; // do not round to 100 if percent >= 99.5- return Math.round(percent);-});--const strokeDasharray = computed(() => {- let percent = displayPercent.value;- const offset = props.thickness - 3;- const max = 96 - offset; // 96 makes it looks okay when using default thickness- if (percent >= max && percent < 100) {- // keep a tiny gap when it's very closed to 100%- percent = max;- }-- return `${percent}, 100`;-});-</script>diff --git a/frontend/src/bbkit/BBSpin.vue b/frontend/src/bbkit/BBSpin.vueindex dec1260a2a..4fe2af3862 100644--- a/frontend/src/bbkit/BBSpin.vue+++ b/frontend/src/bbkit/BBSpin.vue@@ -1,35 +1,7 @@<template>- <div class="flex flex-row items-center text-control text-sm">- <svg- class="animate-spin h-5 w-5"- :class="[color, title && 'mr-1']"- xmlns="http://www.w3.org/2000/svg"- fill="none"- viewBox="0 0 24 24"- >- <circle- class="opacity-25"- cx="12"- cy="12"- r="10"- stroke="currentColor"- stroke-width="4"- ></circle>- <path- class="opacity-75"- fill="currentColor"- d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"- ></path>- </svg>- {{ title }}- </div>+ <NSpin v-bind="$attrs" :size="'small'" :stroke-width="25" class="w-5 h-5" /></template><script lang="ts" setup>-import { withDefaults } from "vue";--withDefaults(defineProps<{ title?: string; color?: string }>(), {- title: "",- color: "text-blue-600",-});+import { NSpin } from "naive-ui";</script>diff --git a/frontend/src/bbkit/BBStepBar.vue b/frontend/src/bbkit/BBStepBar.vuedeleted file mode 100644index f106a7d0d7..0000000000--- a/frontend/src/bbkit/BBStepBar.vue+++ /dev/null@@ -1,102 +0,0 @@-<template>- <nav aria-label="Progress">- <ol class="flex items-center">- <li v-for="(step, index) in stepList" :key="index" class="relative pr-1">- <div- v-if="index != stepList.length - 1"- class="absolute inset-0 flex items-center"- aria-hidden="true"- >- <div class="h-0.5 w-full bg-gray-300"></div>- </div>- <div- class="relative w-6 h-6 flex items-center justify-center rounded-full"- :class="stepClass(step.status)"- @click.stop.prevent="$emit('click-step', step)"- >- <template v-if="step.status == `PENDING`">- <span- class="h-1.5 w-1.5 bg-control rounded-full"- aria-hidden="true"- ></span>- </template>- <template v-else-if="step.status == `PENDING_ACTIVE`">- <span- class="h-2 w-2 bg-blue-600 rounded-full"- aria-hidden="true"- ></span>- </template>- <template- v-else-if="- step.status == `PENDING_APPROVAL` ||- step.status == `PENDING_APPROVAL_ACTIVE`- "- >- <heroicons-outline:user class="w-4 h-4" />- </template>- <template v-else-if="step.status == `RUNNING`">- <span- class="h-2.5 w-2.5 bg-blue-600 rounded-full"- style="- animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;- "- aria-hidden="true"- ></span>- </template>- <template v-else-if="step.status == `DONE`">- <heroicons-outline:check class="w-5 h-5" />- </template>- <template v-else-if="step.status == `FAILED`">- <span- class="h-2.5 w-2.5 rounded-full text-center pb-6 font-medium text-base"- aria-hidden="true"- >!</span- >- </template>- <template v-else-if="step.status == `CANCELED`">- <heroicons-solid:minus class="w-5 h-5" />- </template>- <template v-else-if="step.status == `SKIPPED`">- <heroicons-solid:minus class="w-4 h-4" />- </template>- </div>- </li>- </ol>- </nav>-</template>--<script lang="ts" setup>-import { BBStep, BBStepStatus } from "./types";--defineProps<{- stepList: BBStep[];-}>();--defineEmits<{- (event: "click-step", step: BBStep): void;-}>();--const stepClass = (status: BBStepStatus) => {- switch (status) {- case "PENDING":- case "NOT_STARTED":- return "bg-white border-2 border-control hover:border-control-hover";- case "PENDING_ACTIVE":- return "bg-white border-2 border-blue-600 text-blue-600 hover:text-blue-700 hover:border-blue-700";- case "PENDING_APPROVAL":- return "bg-white border-2 border-control hover:border-control-hover";- case "PENDING_APPROVAL_ACTIVE":- return "bg-white border-2 border-blue-600 text-blue-600 hover:text-blue-700 hover:border-blue-700";- case "RUNNING":- return "bg-white border-2 border-blue-600 text-blue-600 hover:text-blue-700 hover:border-blue-700";- case "DONE":- return "bg-success hover:bg-success-hover text-white";- case "FAILED":- return "bg-error hover:bg-error-hover text-white";- case "CANCELED":- return "bg-white border-2 text-gray-400 border-gray-400 hover:text-gray-500 hover:border-gray-500";- case "SKIPPED":- return "bg-white border-2 text-gray-300 border-gray-300 hover:text-gray-400 hover:border-gray-400";- }-};-</script>diff --git a/frontend/src/bbkit/BBTabFilter.vue b/frontend/src/bbkit/BBTabFilter.vuedeleted file mode 100644index 91b88a504c..0000000000--- a/frontend/src/bbkit/BBTabFilter.vue+++ /dev/null@@ -1,80 +0,0 @@-<template>- <div>- <div :class="responsive ? 'sm:hidden' : 'hidden'">- <label for="tabs" class="sr-only">Select a tab</label>- <select- id="tabs"- name="tabs"- class="control block w-full"- @change="- (e: any) => {- $emit('select-index', parseInt(e.target.value, 10));- }- "- >- <option- v-for="(item, index) in tabItemList"- :key="index"- :value="index"- :selected="index == selectedIndex"- >- {{ item.title }}- </option>- </select>- </div>- <div :class="responsive ? 'hidden sm:block' : 'block'">- <div- class="flex py-1 space-x-1 w-full overflow-x-auto hide-scrollbar"- aria-label="Tabs"- >- <button- v-for="(item, index) in tabItemList"- :key="index"- class="tab px-3 py-1 flex items-center"- :class="buttonClass(index == selectedIndex)"- @click.prevent="$emit('select-index', index)"- >- {{ item.title }}- <span- v-if="item.alert"- class="flex items-center justify-center rounded-full select-none ml-2 w-4 h-4 text-white"- :class="index == selectedIndex ? 'bg-gray-600' : 'bg-red-600'"- >- <span- class="h-2 w-2 rounded-full text-center pb-6 font-normal text-base"- aria-hidden="true"- >!</span- >- </span>- </button>- </div>- </div>- </div>-</template>--<script lang="ts" setup>-import { withDefaults } from "vue";-import { BBTabFilterItem } from "./types";--withDefaults(- defineProps<{- tabItemList: BBTabFilterItem[];- selectedIndex: number;- responsive?: boolean;- }>(),- {- responsive: true,- }-);--defineEmits<{- (event: "select-index", index: number): void;-}>();--const buttonClass = (selected: boolean) => {- if (selected) {- return "bg-gray-200 text-gray-800 whitespace-nowrap";- }- return "text-gray-500 hover:text-gray-700 whitespace-nowrap";-};-</script>diff --git a/frontend/src/bbkit/BBTabPanel.vue b/frontend/src/bbkit/BBTabPanel.vuedeleted file mode 100644index 3e75d74c9d..0000000000--- a/frontend/src/bbkit/BBTabPanel.vue+++ /dev/null@@ -1,9 +0,0 @@-<template>- <section v-if="active" :aria-hidden="!active">- <slot />- </section>-</template>--<script lang="ts" setup>-defineProps<{ active: boolean }>();-</script>diff --git a/frontend/src/bbkit/index.ts b/frontend/src/bbkit/index.tsindex 593d6283ce..4728fb07ed 100644--- a/frontend/src/bbkit/index.ts+++ b/frontend/src/bbkit/index.ts@@ -10,16 +10,11 @@ import BBDialog from "./BBDialog.vue";import { BBGrid } from "./BBGrid";import BBModal from "./BBModal.vue";import BBNotification from "./BBNotification.vue";-import BBOutline from "./BBOutline.vue";-import BBProgressPie from "./BBProgressPie.vue";import BBSelect from "./BBSelect.vue";import BBSpin from "./BBSpin.vue";-import BBStepBar from "./BBStepBar.vue";import BBStepTab from "./BBStepTab.vue";import BBSwitch from "./BBSwitch.vue";import BBTab from "./BBTab.vue";-import BBTabFilter from "./BBTabFilter.vue";-import BBTabPanel from "./BBTabPanel.vue";import {BBTable,BBTableCell,@@ -43,16 +38,11 @@ export {BBModal,BBDialog,BBNotification,- BBOutline,BBSelect,- BBProgressPie,BBSpin,- BBStepBar,BBStepTab,BBSwitch,BBTab,- BBTabPanel,- BBTabFilter,BBTable,BBTableCell,BBTableHeaderCell,diff --git a/frontend/src/bbkit/types.ts b/frontend/src/bbkit/types.tsindex 9b2796575a..e42302c78a 100644--- a/frontend/src/bbkit/types.ts+++ b/frontend/src/bbkit/types.ts@@ -1,4 +1,3 @@-import { VNode } from "vue";import { VueClass } from "@/utils";import { ColumnWidth } from "./BBGrid";@@ -48,11 +47,6 @@ export type BBTabItem<T = any> = {data?: T;};-export type BBTabFilterItem = {- title: string;- alert: boolean;-};-export type BBStepStatus =| "NOT_STARTED"| "PENDING"@@ -75,16 +69,6 @@ export type BBStepTabItem = {hideNext?: boolean;};-export type BBOutlineItem = {- id: string;- name: string;- link?: string;- childList?: BBOutlineItem[];- // Only applicable if childList is specified.- childCollapse?: boolean;- prefix?: VNode;-};-export type BBNotificationStyle = "INFO" | "SUCCESS" | "WARN" | "CRITICAL";export type BBNotificationPlacement =| "TOP_LEFT"diff --git a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscribeButton.vue b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscribeButton.vueindex ab13f16401..12231e027e 100644--- a/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscribeButton.vue+++ b/frontend/src/components/IssueV1/components/ActivitySection/Subscribers/SubscribeButton.vue@@ -1,6 +1,6 @@<template><NButton text :disabled="isLoading" @click="handleClick">- <BBSpin v-if="isLoading" class="w-4 h-4 mr-1" />+ <BBSpin v-if="isLoading" class="!w-4 !h-4 mr-1" /><span>{{ isSubscribed ? $t("issue.unsubscribe") : $t("issue.subscribe") }}</span>diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vue b/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vueindex 3978594222..06ebfc18d4 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Assignee/AssigneeAttentionButton.vue@@ -12,7 +12,7 @@v-bind="$attrs"@click="notifyAssignee">- <BBSpin v-if="isUpdating" class="w-4 h-4" />+ <BBSpin v-if="isUpdating" class="!w-4 !h-4" /><heroicons-outline:bell-alertv-elseclass="w-4 h-4"diff --git a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vue b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vueindex 7cc723352d..5914438569 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/ReviewSection/ReviewSection.vue@@ -18,7 +18,7 @@v-if="!ready"class="flex items-center gap-x-2 text-sm text-control-placeholder">- <BBSpin class="w-4 h-4" />+ <BBSpin class="!w-4 !h-4" /><span>{{ $t("custom-approval.issue-review.generating-approval-flow") }}</span>diff --git a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vueindex ce64c6c179..d8b9b7ddb8 100644--- a/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue+++ b/frontend/src/components/IssueV1/components/PlanCheckSection/PlanCheckBar/PlanCheckRunButton.vue@@ -8,7 +8,7 @@@click="$emit('run-checks', ($event as ButtonAction).params.taskList)"><template #icon>- <BBSpin v-if="hasRunningPlanCheck" class="w-4 h-4" />+ <BBSpin v-if="hasRunningPlanCheck" class="!w-4 !h-4" /><heroicons-outline:play v-else class="w-4 h-4" /></template><template #default="{ action }">diff --git a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vue b/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vueindex 48fdacc179..f9feeeeed9 100644--- a/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vue+++ b/frontend/src/components/IssueV1/components/StageSection/Actions/RollbackSection/LoggingButton.vue@@ -2,7 +2,7 @@<divclass="select-none inline-flex items-center gap-x-1 h-[30px] text-control bg-white focus:ring-control focus:outline-none focus-visible:ring-2 focus:ring-offset-2">- <BBSpin class="w-4 h-4" />+ <BBSpin class="!w-4 !h-4" /><span class="text-sm leading-5 font-medium">{{$t("task.rollback.generating")}}</span>diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vueindex 9701410944..ce951072e2 100644--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskProgress.vue@@ -1,25 +1,24 @@<template>- <BBProgressPie- :percent="percent"- class="w-10 h-10 issue-debug"- :class="task.status === Task_Status.DONE ? 'text-success' : 'text-info'"- :thickness="3"+ <NProgress+ type="circle"+ :percentage="percent"+ style="width: 2.5rem"+ :stroke-width="10">- <!-- eslint-disable vue/no-template-shadow -->- <template #default="{ percent }">- <span v-if="task.status !== Task_Status.DONE" class="text-xs">- {{ percent }}%- </span>- <span v-else>- <heroicons-outline:check class="w-8 h-8" />- </span>- </template>- </BBProgressPie>+ <span+ v-if="task.status !== Task_Status.DONE"+ class="text-xs text-info issue-debug"+ >+ {{ `${Math.round(percent)}%` }}+ </span>+ <span v-else>+ <heroicons-outline:check class="w-8 h-8 text-success" />+ </span>+ </NProgress></template><script setup lang="ts">import { computed } from "vue";-import { BBProgressPie } from "@/bbkit";import { Task, Task_Status } from "@/types/proto/v1/rollout_service";defineProps<{diff --git a/frontend/src/components/ProjectListSidePanel.vue b/frontend/src/components/ProjectListSidePanel.vuedeleted file mode 100644index 0d55d0ec4e..0000000000--- a/frontend/src/components/ProjectListSidePanel.vue+++ /dev/null@@ -1,66 +0,0 @@-<template>- <BBOutline- :id="'project'"- :title="$t('common.projects')"- :item-list="outlineItemList"- :allow-collapse="false"- :outline-item-class="'pt-0.5 pb-0.5'"- />-</template>--<script lang="ts" setup>-import { Action, defineAction, useRegisterActions } from "@bytebase/vue-kbar";-import { computed } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";-import { useCurrentUserV1, useProjectV1ListByCurrentUser } from "@/store";-import { DEFAULT_PROJECT_ID } from "@/types";-import { BBOutlineItem } from "../bbkit/types";-import { isMemberOfProjectV1, projectV1Slug } from "../utils";--const { t } = useI18n();-const router = useRouter();-const currentUserV1 = useCurrentUserV1();-const { projectList } = useProjectV1ListByCurrentUser();--const filteredProjectList = computed(() => {- const list = projectList.value.filter(- (project) =>- project.uid != String(DEFAULT_PROJECT_ID) &&- // Only show projects that the user is a member of.- isMemberOfProjectV1(project.iamPolicy, currentUserV1.value)- );- return list;-});--const outlineItemList = computed((): BBOutlineItem[] => {- return filteredProjectList.value- .map((project): BBOutlineItem => {- return {- id: project.uid,- name: project.title,- link: `/project/${projectV1Slug(project)}#overview`,- };- })- .sort((a: any, b: any) => {- return a.name.localeCompare(b.name);- });-});--const kbarActions = computed((): Action[] => {- const actions = outlineItemList.value.map((proj: any) =>- defineAction({- // here `id` looks like "bb.project.1234"- id: `bb.project.${proj.id}`,- section: t("common.projects"),- name: proj.name,- keywords: "project",- perform: () => {- router.push({ path: proj.link });- },- })- );- return actions;-});-useRegisterActions(kbarActions);-</script>diff --git a/frontend/src/components/SQLCheck/SQLCheckButton.vue b/frontend/src/components/SQLCheck/SQLCheckButton.vueindex b859ad60c3..805501fc0d 100644--- a/frontend/src/components/SQLCheck/SQLCheckButton.vue+++ b/frontend/src/components/SQLCheck/SQLCheckButton.vue@@ -13,7 +13,7 @@@click="runChecks"><template #icon>- <BBSpin v-if="isRunning" class="w-4 h-4" />+ <BBSpin v-if="isRunning" class="!w-4 !h-4" /><heroicons-outline:play v-else class="w-4 h-4" /></template><template #default>diff --git a/frontend/src/components/misc/UploadProgressButton.vue b/frontend/src/components/misc/UploadProgressButton.vueindex 702edbd118..0f3d386a58 100644--- a/frontend/src/components/misc/UploadProgressButton.vue+++ b/frontend/src/components/misc/UploadProgressButton.vue@@ -10,16 +10,17 @@<heroicons-outline:arrow-up-tray class="w-4 h-4" /></slot><template v-else>- <BBProgressPie+ <NProgressv-if="percent > 0"- :percent="percent"- class="w-4 h-4 text-info"+ type="circle"+ :percentage="percent"+ style="width: 1rem">- <template #default="{ percent: displayPercent }">- <span class="scale-[66%]">{{ displayPercent }}</span>- </template>- </BBProgressPie>- <BBSpin v-else class="w-4 h-4" />+ <span class="text-info scale-[66%]">+ {{ `${Math.round(percent)}%` }}+ </span>+ </NProgress>+ <BBSpin v-else class="!w-4 !h-4" /></template></template>@@ -43,7 +44,6 @@<script lang="ts" setup>import { NButton } from "naive-ui";import { computed, ref } from "vue";-import { BBProgressPie } from "@/bbkit";type Tick = (p: number) => void;diff --git a/frontend/src/plugins/ai/components/DynamicSuggestions.vue b/frontend/src/plugins/ai/components/DynamicSuggestions.vueindex 11d8dcd933..3db40a2225 100644--- a/frontend/src/plugins/ai/components/DynamicSuggestions.vue+++ b/frontend/src/plugins/ai/components/DynamicSuggestions.vue@@ -1,7 +1,7 @@<template><div class="flex items-center overflow-hidden h-[22px]"><template v-if="dynamicSuggestions && !ready">- <BBSpin class="w-4 h-4 mr-2" />+ <BBSpin class="!w-4 !h-4 mr-2" /><span class="text-sm">{{$t("plugin.ai.conversation.tips.suggest-prompt")}}</span>@@ -25,7 +25,7 @@</NEllipsis><div class="shrink-0 flex items-center">- <BBSpin v-if="state === 'LOADING'" class="w-4 h-4" />+ <BBSpin v-if="state === 'LOADING'" class="!w-4 !h-4" /><buttonv-if="state === 'IDLE'"class="text-gray-500 cursor-pointer py-0.5 px-1 rounded-md hover:bg-gray-200"diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vueindex b3301a0a53..b53a7a862e 100644--- a/frontend/src/views/DatabaseDetail.vue+++ b/frontend/src/views/DatabaseDetail.vue@@ -88,7 +88,15 @@class="flex flex-row justify-start items-center flex-wrap shrink gap-x-2 gap-y-2"data-label="bb-database-detail-action-buttons-container">- <BBSpin v-if="state.syncingSchema" :title="$t('instance.syncing')" />+ <div+ v-if="state.syncingSchema"+ class="flex justify-center items-center space-x-2"+ >+ <BBSpin />+ <span class="text-control text-sm">+ {{ $t("instance.syncing") }}+ </span>+ </div><NButton:disabled="state.syncingSchema"@click.prevent="syncDatabaseSchema"diff --git a/frontend/src/views/EnvironmentDashboard.vue b/frontend/src/views/EnvironmentDashboard.vueindex 890833e652..45ea60ebb0 100644--- a/frontend/src/views/EnvironmentDashboard.vue+++ b/frontend/src/views/EnvironmentDashboard.vue@@ -16,30 +16,31 @@</div></template>- <BBTabPanel- v-for="(env, index) in environmentList"- :key="env.uid"- :active="index == state.selectedIndex"- class="flex-1 overflow-y-scroll"- >- <div v-if="state.reorder" class="flex justify-center pt-5 gap-x-3">- <NButton @click.prevent="discardReorder">- {{ $t("common.cancel") }}- </NButton>- <NButton- type="primary"- :disabled="!orderChanged"- @click.prevent="doReorder"- >- {{ $t("common.apply") }}- </NButton>+ <template v-for="(env, index) in environmentList" :key="env.uid">+ <div+ v-if="index == state.selectedIndex"+ class="flex-1 overflow-y-scroll"+ :aria-hidden="index !== state.selectedIndex"+ >+ <div v-if="state.reorder" class="flex justify-center pt-5 gap-x-3">+ <NButton @click.prevent="discardReorder">+ {{ $t("common.cancel") }}+ </NButton>+ <NButton+ type="primary"+ :disabled="!orderChanged"+ @click.prevent="doReorder"+ >+ {{ $t("common.apply") }}+ </NButton>+ </div>+ <EnvironmentDetail+ v-else+ :environment-slug="environmentV1Slug(env)"+ @archive="doArchive"+ /></div>- <EnvironmentDetail- v-else- :environment-slug="environmentV1Slug(env)"- @archive="doArchive"- />- </BBTabPanel>+ </template></BBTab></div>diff --git a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vueindex 3808a32cbf..6aa0da5912 100644--- a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue+++ b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue@@ -56,8 +56,11 @@class="ml-3"/></div>- <div v-else class="flex justify-center items-center h-full">- <BBSpin :title="$t('sql-editor.loading-databases')" />+ <div v-else class="flex justify-center items-center h-full space-x-2">+ <BBSpin />+ <span class="text-control text-sm">{{+ $t("sql-editor.loading-databases")+ }}</span></div></template>diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.jsindex 597c0782e9..ca4c454c09 100644--- a/frontend/tailwind.config.js+++ b/frontend/tailwind.config.js@@ -10,7 +10,6 @@ module.exports = {mode: "jit",safelist: [// "w-xxx" is used by BBTab- // "pl-xxx" is used by BBOutline// "bg-xxx", "text-xxx" is used by BBAttention TaskCheckBadgeBar BBBadge// "hover:bg-xxx" is used by TaskCheckBadgeBar BBBadge// "grid-cols-xxx" is used by AnomalyCenterDashboard