Skip to content

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

chore: optimize ui (#14273)

ecmadaoc758dc445703
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
index bc04093011..c5cc3611fd 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
@@ -9,7 +9,7 @@
/>
<div class="w-full grid grid-cols-3 gap-x-6">
<div>
- <p class="text-lg mb-2">{{ $t("common.name") }}</p>
+ <p class="font-medium text-main mb-2">{{ $t("common.name") }}</p>
<NInput v-model:value="state.placeholder" />
<div class="mt-2">
<ResourceIdField
@@ -27,7 +27,7 @@
<NDivider />
<div class="w-full grid grid-cols-5 gap-x-6">
<div class="col-span-3">
- <p class="pl-1 text-lg mb-2">
+ <p class="pl-1 font-medium text-main mb-2">
{{ $t("database-group.condition.self") }}
</p>
<ExprEditor
@@ -55,13 +55,13 @@
</div>
<NDivider />
<div class="w-full pl-1">
- <p class="text-lg mb-2">
+ <p class="font-medium text-main mb-2">
{{ $t("common.options") }}
</p>
<div>
<NCheckbox
v-model:checked="state.multitenancy"
- size="large"
+ size="medium"
:label="$t('database-group.multitenancy.self')"
/>
<p class="text-sm text-gray-400 pl-6 ml-0.5">
@@ -75,9 +75,9 @@
</div>
</div>
- <div class="space-y-6 w-full sticky bottom-0 bg-white">
+ <div class="w-full sticky bottom-0 bg-white">
<NDivider />
- <div class="w-full flex justify-between items-center">
+ <div class="w-full flex justify-between items-center pb-2">
<div>
<NButton v-if="!isCreating" text @click="doDelete">
<template #icon>
diff --git a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
index 941a04616d..4fb0466a02 100644
--- a/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
+++ b/frontend/src/components/DatabaseGroup/MatchedDatabaseView.vue
@@ -1,6 +1,6 @@
<template>
<div v-if="!hideTitle" class="mb-2 flex flex-row items-center">
- <span class="text-base mr-2">{{ $t("common.databases") }}</span>
+ <span class="font-medium text-main mr-2">{{ $t("common.databases") }}</span>
<BBSpin v-if="loading" class="opacity-60" />
</div>
diff --git a/frontend/src/components/Member/MembersBindingSelect.vue b/frontend/src/components/Member/MembersBindingSelect.vue
index 3dcaf93b99..c99d630052 100644
--- a/frontend/src/components/Member/MembersBindingSelect.vue
+++ b/frontend/src/components/Member/MembersBindingSelect.vue
@@ -28,7 +28,7 @@
</template>
</i18n-t>
<div :class="['w-full space-y-2', memberType !== 'USERS' ? 'hidden' : '']">
- <div class="flex items-center gap-x-1">
+ <div class="flex font-medium text-main items-center gap-x-1">
{{ $t("settings.members.select-user", 2 /* multiply*/) }}
<span v-if="required" class="text-red-600">*</span>
</div>
@@ -45,7 +45,7 @@
/>
</div>
<div :class="['w-full space-y-2', memberType !== 'GROUPS' ? 'hidden' : '']">
- <div class="flex items-center gap-x-1">
+ <div class="flex font-medium text-main items-center gap-x-1">
{{ $t("settings.members.select-group", 2 /* multiply*/) }}
<span v-if="required" class="text-red-600">*</span>
</div>
diff --git a/frontend/src/components/Project/ProjectReleasesPanel.vue b/frontend/src/components/Project/ProjectReleasesPanel.vue
index a66b056abb..23ce995bc0 100644
--- a/frontend/src/components/Project/ProjectReleasesPanel.vue
+++ b/frontend/src/components/Project/ProjectReleasesPanel.vue
@@ -2,11 +2,11 @@
<div class="w-full flex flex-col gap-y-2">
<div class="w-full flex flex-row justify-end items-center">
<router-link :to="`/${project.name}/releases/new`">
- <NButton>
+ <NButton type="primary">
<template #icon>
<PlusIcon />
</template>
- {{ $t("common.new") }}
+ {{ $t("release.create") }}
</NButton>
</router-link>
</div>
diff --git a/frontend/src/components/Project/useProjectSidebar.ts b/frontend/src/components/Project/useProjectSidebar.ts
index 3b9b3e4242..6caa41cf16 100644
--- a/frontend/src/components/Project/useProjectSidebar.ts
+++ b/frontend/src/components/Project/useProjectSidebar.ts
@@ -216,6 +216,7 @@ export const useProjectSidebar = (
hide:
isDefaultProject.value ||
databaseChangeMode.value === DatabaseChangeMode.EDITOR,
+ expand: true,
children: [
{
title: t("common.gitops"),
diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vue
index 48af4915bf..2210e6bc6f 100644
--- a/frontend/src/components/ProjectWebhookForm.vue
+++ b/frontend/src/components/ProjectWebhookForm.vue
@@ -1,192 +1,204 @@
<template>
- <div class="flex flex-col gap-y-4">
- <div v-if="create">
- <div>
- <label for="name" class="font-medium text-main">
- {{ $t("project.webhook.destination") }}
- <span class="text-red-600">*</span>
- </label>
- </div>
- <NRadioGroup class="w-full mt-1" :value="state.webhook.type">
- <div class="grid grid-cols-1 gap-4 sm:grid-cols-7">
- <template v-for="(item, index) in webhookTypeItemList" :key="index">
- <div
- class="flex justify-center px-2 py-4 rounded border border-control-border hover:bg-control-bg-hover cursor-pointer"
- @click.capture="state.webhook.type = item.type"
- >
- <div class="flex flex-col items-center">
- <WebhookTypeIcon :type="item.type" class="h-10 w-10" />
- <p class="mt-1 text-center textlabel">
- {{ item.name }}
- </p>
- <div class="mt-3 radio text-sm">
- <NRadio :value="item.type" />
+ <div class="w-full h-full flex flex-col">
+ <div class="flex-1 pb-4">
+ <div class="flex flex-col gap-y-4">
+ <div v-if="create">
+ <div>
+ <label for="name" class="font-medium text-main">
+ {{ $t("project.webhook.destination") }}
+ <span class="text-red-600">*</span>
+ </label>
+ </div>
+ <NRadioGroup class="w-full mt-1" :value="state.webhook.type">
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-7">
+ <template
+ v-for="(item, index) in webhookTypeItemList"
+ :key="index"
+ >
+ <div
+ class="flex justify-center px-2 py-4 rounded border border-control-border hover:bg-control-bg-hover cursor-pointer"
+ @click.capture="state.webhook.type = item.type"
+ >
+ <div class="flex flex-col items-center">
+ <WebhookTypeIcon :type="item.type" class="h-10 w-10" />
+ <p class="mt-1 text-center textlabel">
+ {{ item.name }}
+ </p>
+ <div class="mt-3 radio text-sm">
+ <NRadio :value="item.type" />
+ </div>
+ </div>
</div>
- </div>
+ </template>
</div>
- </template>
+ </NRadioGroup>
+ </div>
+ <div>
+ <label for="name" class="font-medium text-main">
+ {{ $t("common.name") }} <span class="text-red-600">*</span>
+ </label>
+ <NInput
+ id="name"
+ v-model:value="state.webhook.title"
+ name="name"
+ class="mt-1 w-full"
+ :placeholder="`${selectedWebhook?.name ?? 'My'} Webhook`"
+ :disabled="!allowEdit"
+ />
+ </div>
+ <div>
+ <label for="url" class="font-medium text-main">
+ {{ $t("project.webhook.webhook-url") }}
+ <span class="text-red-600">*</span>
+ </label>
+ <div class="mt-1 textinfolabel">
+ {{
+ $t("project.webhook.creation.desc", {
+ destination: selectedWebhook?.name,
+ })
+ }}
+ <a
+ :href="selectedWebhook?.docUrl"
+ target="__blank"
+ class="normal-link"
+ >{{
+ $t("project.webhook.creation.view-doc", {
+ destination: selectedWebhook?.name,
+ })
+ }}</a
+ >.
+ </div>
+ <NInput
+ id="url"
+ v-model:value="state.webhook.url"
+ name="url"
+ class="mt-1 w-full"
+ :placeholder="selectedWebhook?.urlPlaceholder"
+ :disabled="!allowEdit"
+ />
</div>
- </NRadioGroup>
- </div>
- <div>
- <label for="name" class="font-medium text-main">
- {{ $t("common.name") }} <span class="text-red-600">*</span>
- </label>
- <NInput
- id="name"
- v-model:value="state.webhook.title"
- name="name"
- class="mt-1 w-full"
- :placeholder="`${selectedWebhook?.name ?? 'My'} Webhook`"
- :disabled="!allowEdit"
- />
- </div>
- <div>
- <label for="url" class="font-medium text-main">
- {{ $t("project.webhook.webhook-url") }}
- <span class="text-red-600">*</span>
- </label>
- <div class="mt-1 textinfolabel">
- {{
- $t("project.webhook.creation.desc", {
- destination: selectedWebhook?.name,
- })
- }}
- <a
- :href="selectedWebhook?.docUrl"
- target="__blank"
- class="normal-link"
- >{{
- $t("project.webhook.creation.view-doc", {
- destination: selectedWebhook?.name,
- })
- }}</a
- >.
- </div>
- <NInput
- id="url"
- v-model:value="state.webhook.url"
- name="url"
- class="mt-1 w-full"
- :placeholder="selectedWebhook?.urlPlaceholder"
- :disabled="!allowEdit"
- />
- </div>
- <div>
- <div class="text-md leading-6 font-medium text-main">
- {{ $t("project.webhook.triggering-activity") }}
- <span class="text-red-600">*</span>
- </div>
- <div
- v-for="(item, index) in webhookActivityItemList"
- :key="index"
- class="mt-4 space-y-4"
- >
<div>
- <div class="flex items-center">
+ <div class="text-md leading-6 font-medium text-main">
+ {{ $t("project.webhook.triggering-activity") }}
+ <span class="text-red-600">*</span>
+ </div>
+ <div class="flex flex-col space-y-4 mt-2">
+ <div v-for="(item, index) in webhookActivityItemList" :key="index">
+ <div>
+ <div class="flex items-center">
+ <NCheckbox
+ :label="item.title"
+ :checked="isEventOn(item.activity)"
+ @update:checked="
+ (on: boolean) => {
+ toggleEvent(item.activity, on);
+ }
+ "
+ />
+ <NTooltip
+ v-if="
+ webhookSupportDirectMessage && item.supportDirectMessage
+ "
+ >
+ <template #trigger>
+ <InfoIcon class="w-4 h-auto text-gray-500" />
+ </template>
+ {{ $t("project.webhook.activity-support-direct-message") }}
+ </NTooltip>
+ </div>
+ <div class="textinfolabel">{{ item.label }}</div>
+ </div>
+ </div>
+ </div>
+ <div class="mt-4">
+ <NButton @click.prevent="testWebhook">
+ {{ $t("project.webhook.test-webhook") }}
+ </NButton>
+ </div>
+ </div>
+ <div v-if="webhookSupportDirectMessage && activitySupportDirectMessage">
+ <div class="text-md leading-6 font-medium text-main">
+ {{ $t("project.webhook.direct-messages") }}
+ </div>
+ <span class="mt-1 textinfolabel">
+ {{ $t("project.webhook.direct-messages-tip") }}
+ </span>
+ <BBAttention v-if="!imApp?.enabled" class="mt-2 mb-4" type="warning">
+ <template #default>
+ <i18n-t
+ class="textinfolabel"
+ tag="div"
+ keypath="project.webhook.direct-messages-warning"
+ >
+ <template #im>
+ <router-link
+ target="_blank"
+ class="normal-link"
+ :to="{ name: WORKSPACE_ROUTE_IM }"
+ >
+ {{ $t("settings.sidebar.im-integration") }}
+ </router-link>
+ </template>
+ </i18n-t>
+ </template>
+ </BBAttention>
+ <div class="flex items-center mt-2">
<NCheckbox
- :label="item.title"
- :checked="isEventOn(item.activity)"
- @update:checked="
- (on: boolean) => {
- toggleEvent(item.activity, on);
- }
- "
+ v-model:checked="state.webhook.directMessage"
+ :label="$t('project.webhook.enable-direct-messages')"
/>
- <NTooltip
- v-if="webhookSupportDirectMessage && item.supportDirectMessage"
- >
- <template #trigger>
- <InfoIcon class="w-4 h-auto text-gray-500" />
- </template>
- {{ $t("project.webhook.activity-support-direct-message") }}
- </NTooltip>
</div>
- <div class="textinfolabel">{{ item.label }}</div>
</div>
</div>
- <div class="mt-4">
- <NButton @click.prevent="testWebhook">
- {{ $t("project.webhook.test-webhook") }}
- </NButton>
- </div>
</div>
- <div v-if="webhookSupportDirectMessage && activitySupportDirectMessage">
- <div class="text-md leading-6 font-medium text-main">
- {{ $t("project.webhook.direct-messages") }}
- </div>
- <span class="mt-1 textinfolabel">
- {{ $t("project.webhook.direct-messages-tip") }}
- </span>
- <BBAttention v-if="!imApp?.enabled" class="mt-2 mb-4" type="warning">
- <template #default>
- <i18n-t
- class="textinfolabel"
- tag="div"
- keypath="project.webhook.direct-messages-warning"
- >
- <template #im>
- <router-link
- target="_blank"
- class="normal-link"
- :to="{ name: WORKSPACE_ROUTE_IM }"
- >
- {{ $t("settings.sidebar.im-integration") }}
- </router-link>
- </template>
- </i18n-t>
- </template>
- </BBAttention>
- <div class="flex items-center mt-2">
- <NCheckbox
- v-model:checked="state.webhook.directMessage"
- :label="$t('project.webhook.enable-direct-messages')"
+ <div class="w-full sticky bottom-0 bg-white">
+ <NDivider />
+ <div
+ class="flex pb-2"
+ :class="!create && allowEdit ? 'justify-between' : 'justify-end'"
+ >
+ <BBButtonConfirm
+ v-if="!create && allowEdit"
+ :type="'DELETE'"
+ :button-text="$t('project.webhook.deletion.btn-text')"
+ :ok-text="$t('common.delete')"
+ :confirm-title="
+ $t('project.webhook.deletion.confirm-title', {
+ title: webhook.title,
+ })
+ "
+ :confirm-description="$t('common.cannot-undo-this-action')"
+ :require-confirm="true"
+ @confirm="deleteWebhook"
/>
- </div>
- </div>
- <div
- class="flex mt-2 pt-4 border-t"
- :class="!create && allowEdit ? 'justify-between' : 'justify-end'"
- >
- <BBButtonConfirm
- v-if="!create && allowEdit"
- :type="'DELETE'"
- :button-text="$t('project.webhook.deletion.btn-text')"
- :ok-text="$t('common.delete')"
- :confirm-title="
- $t('project.webhook.deletion.confirm-title', { title: webhook.title })
- "
- :confirm-description="$t('common.cannot-undo-this-action')"
- :require-confirm="true"
- @confirm="deleteWebhook"
- />
- <div class="space-x-3">
- <NButton v-if="create" @click.prevent="cancel">
- {{ $t("common.cancel") }}
- </NButton>
- <NButton v-else-if="valueChanged" @click.prevent="discardChanges">
- {{ $t("common.discard-changes") }}
- </NButton>
- <template v-if="allowEdit">
- <NButton
- v-if="create"
- type="primary"
- :disabled="!allowCreate"
- @click.prevent="createWebhook"
- >
- {{ $t("common.create") }}
+ <div class="space-x-3">
+ <NButton v-if="create" @click.prevent="cancel">
+ {{ $t("common.cancel") }}
</NButton>
- <NButton
- v-else
- type="primary"
- :disabled="
- !valueChanged || state.webhook.notificationTypes.length === 0
- "
- @click.prevent="updateWebhook"
- >
- {{ $t("common.update") }}
+ <NButton v-else-if="valueChanged" @click.prevent="discardChanges">
+ {{ $t("common.discard-changes") }}
</NButton>
- </template>
+ <template v-if="allowEdit">
+ <NButton
+ v-if="create"
+ type="primary"
+ :disabled="!allowCreate"
+ @click.prevent="createWebhook"
+ >
+ {{ $t("common.create") }}
+ </NButton>
+ <NButton
+ v-else
+ type="primary"
+ :disabled="
+ !valueChanged || state.webhook.notificationTypes.length === 0
+ "
+ @click.prevent="updateWebhook"
+ >
+ {{ $t("common.update") }}
+ </NButton>
+ </template>
+ </div>
</div>
</div>
</div>
@@ -202,6 +214,7 @@ import {
NRadio,
NRadioGroup,
NTooltip,
+ NDivider,
} from "naive-ui";
import { reactive, computed, watch } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/components/Release/ReleaseCreate/ReleaseCreate.vue b/frontend/src/components/Release/ReleaseCreate/ReleaseCreate.vue
index 25ee4ea05e..87558e0e48 100644
--- a/frontend/src/components/Release/ReleaseCreate/ReleaseCreate.vue
+++ b/frontend/src/components/Release/ReleaseCreate/ReleaseCreate.vue
@@ -5,7 +5,10 @@
<NInput v-model:value="title" class="w-full" size="large" />
</div>
<FileToCreateTable />
- <div class="w-full flex justify-end">
+ <div class="w-full flex justify-end gap-x-3">
+ <NButton @click.prevent="() => router.back()">
+ {{ $t("common.cancel") }}
+ </NButton>
<ErrorTipsButton
style="--n-padding: 0 10px"
:errors="createButtonErrors"
@@ -14,17 +17,13 @@
}"
@click="onCreateRelease"
>
- <template #icon>
- <PlusIcon />
- </template>
- {{ $t("common.create") }}
+ {{ $t("release.create") }}
</ErrorTipsButton>
</div>
</div>
</template>
<script lang="ts" setup>
-import { PlusIcon } from "lucide-vue-next";
import { NInput } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/components/RepositorySetupWizard.vue b/frontend/src/components/RepositorySetupWizard.vue
index b3835cbdd9..7747182c88 100644
--- a/frontend/src/components/RepositorySetupWizard.vue
+++ b/frontend/src/components/RepositorySetupWizard.vue
@@ -1,5 +1,5 @@
<template>
- <div>
+ <div class="w-full h-full overflow-hidden flex flex-col space-y-4">
<BBAttention type="info">
<div class="textinfolabel">
<i18n-t keypath="repository.setup-wizard-guide">
@@ -17,7 +17,8 @@
</BBAttention>
<StepTab
- class="mt-4 mb-8"
+ class="pt-4 flex-1 overflow-hidden flex flex-col"
+ pane-class="flex-1 overflow-y-auto"
:current-index="state.currentStep"
:step-list="stepList"
:allow-next="allowNext"
diff --git a/frontend/src/components/SQLReview/SQLReviewCreation.vue b/frontend/src/components/SQLReview/SQLReviewCreation.vue
index 4b51aa4535..b867837a72 100644
--- a/frontend/src/components/SQLReview/SQLReviewCreation.vue
+++ b/frontend/src/components/SQLReview/SQLReviewCreation.vue
@@ -1,14 +1,13 @@
<template>
- <div class="-my-4">
+ <div class="w-full h-full flex flex-col">
<StepTab
:sticky="true"
:current-index="state.currentStep"
:step-list="STEP_LIST"
:allow-next="allowNext"
:finish-title="$t(`common.confirm-and-${policy ? 'update' : 'add'}`)"
- header-class="!-top-4"
- footer-class="!-bottom-4 !pt-4"
- pane-class="!mb-4"
+ class="flex-1 overflow-hidden flex flex-col"
+ pane-class="flex-1 overflow-y-auto"
@update:current-index="changeStepIndex"
@cancel="onCancel"
@finish="tryFinishSetup"
diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vue
index 3e64ed594c..2b111be600 100644
--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue
@@ -3,7 +3,9 @@
<div class="space-y-8 flex-1">
<div class="w-full">
<div class="flex items-center gap-x-1 mb-2">
- <span>{{ $t("common.resources") }}</span>
+ <span class="font-medium text-main">
+ {{ $t("common.resources") }}
+ </span>
<span class="text-red-600">*</span>
</div>
<DatabaseResourceForm
@@ -16,7 +18,9 @@
<div class="w-full">
<div class="flex items-center gap-x-1 mb-2">
- <span>{{ $t("settings.sensitive-data.action.self") }}</span>
+ <span class="font-medium text-main">
+ {{ $t("settings.sensitive-data.action.self") }}
+ </span>
<span class="text-red-600">*</span>
</div>
<div class="flex space-x-4">
@@ -39,7 +43,9 @@
<div class="w-full">
<div class="flex items-center gap-x-1 mb-2">
- <span>{{ $t("settings.sensitive-data.masking-level.self") }}</span>
+ <span class="font-medium text-main">
+ {{ $t("settings.sensitive-data.masking-level.self") }}
+ </span>
<span class="text-red-600">*</span>
</div>
<MaskingLevelRadioGroup
@@ -50,7 +56,9 @@
</div>
<div class="w-full">
- <p class="mb-2">{{ $t("common.expiration") }}</p>
+ <p class="mb-2 font-medium text-main">
+ {{ $t("common.expiration") }}
+ </p>
<NDatePicker
v-model:value="state.expirationTimestamp"
style="width: 100%"
@@ -72,9 +80,9 @@
/>
</div>
- <div class="space-y-6 w-full sticky bottom-0 bg-white">
+ <div class="w-full sticky bottom-0 bg-white">
<NDivider />
- <div class="flex justify-end items-center pb-4">
+ <div class="flex justify-end items-center pb-2">
<div class="flex items-center gap-x-3">
<NButton @click.prevent="onDismiss">
{{ $t("common.cancel") }}
diff --git a/frontend/src/components/VCS/VCSSetupWizard.vue b/frontend/src/components/VCS/VCSSetupWizard.vue
index 2bf3d4895e..e0c9a16340 100644
--- a/frontend/src/components/VCS/VCSSetupWizard.vue
+++ b/frontend/src/components/VCS/VCSSetupWizard.vue
@@ -1,23 +1,30 @@
<template>
- <VCSProviderBasicInfoPanel :create="true" :config="state.config" />
- <div class="pt-4 mt-6 flex border-t justify-end">
- <div class="space-x-3">
- <NButton @click.prevent="cancelSetup">
- {{ $t("common.cancel") }}
- </NButton>
- <NButton
- type="primary"
- :disabled="!allowCreate"
- @click.prevent="tryFinishSetup"
- >
- {{ $t("common.confirm-and-add") }}
- </NButton>
+ <div class="flex flex-col">
+ <div class="flex-1">
+ <VCSProviderBasicInfoPanel :create="true" :config="state.config" />
+ </div>
+ <div class="w-full sticky bottom-0 bg-white">
+ <NDivider />
+ <div class="flex justify-end items-center pb-2">
+ <div class="space-x-3">
+ <NButton v-if="showCancel" @click.prevent="cancelSetup">
+ {{ $t("common.cancel") }}
+ </NButton>
+ <NButton
+ type="primary"
+ :disabled="!allowCreate"
+ @click.prevent="tryFinishSetup"
+ >
+ {{ $t("common.confirm-and-add") }}
+ </NButton>
+ </div>
+ </div>
</div>
</div>
</template>
<script lang="ts" setup>
-import { NButton } from "naive-ui";
+import { NButton, NDivider } from "naive-ui";
import { reactive, computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -29,14 +36,9 @@ import type { VCSProvider } from "@/types/proto/v1/vcs_provider_service";
import { hasWorkspacePermissionV2 } from "@/utils";
import VCSProviderBasicInfoPanel from "./VCSProviderBasicInfoPanel.vue";
-withDefaults(
- defineProps<{
- showCancel?: boolean;
- }>(),
- {
- showCancel: true,
- }
-);
+defineProps<{
+ showCancel: boolean;
+}>();
interface LocalState {
config: VCSConfig;
@@ -90,8 +92,6 @@ const tryFinishSetup = () => {
};
const cancelSetup = () => {
- router.push({
- name: WORKSPACE_ROUTE_GITOPS,
- });
+ router.back();
};
</script>
diff --git a/frontend/src/layouts/SettingLayout.vue b/frontend/src/layouts/SettingLayout.vue
index 27db87bae4..5ca87b12c0 100644
--- a/frontend/src/layouts/SettingLayout.vue
+++ b/frontend/src/layouts/SettingLayout.vue
@@ -1,5 +1,5 @@
<template>
- <div class="px-4">
+ <div class="px-4 h-full">
<router-view v-if="hasPermission" :allow-edit="allowEdit" v-bind="$attrs" />
<NoPermissionPlaceholder v-else />
</div>
diff --git a/frontend/src/views/SettingWorkspaceMailDelivery.vue b/frontend/src/views/SettingWorkspaceMailDelivery.vue
index a8d8a36a90..a19f452612 100644
--- a/frontend/src/views/SettingWorkspaceMailDelivery.vue
+++ b/frontend/src/views/SettingWorkspaceMailDelivery.vue
@@ -1,161 +1,168 @@
<template>
- <div class="w-full space-y-4">
- <div class="textinfolabel">
- {{ $t("settings.mail-delivery.description") }}
- <a
- class="normal-link inline-flex items-center"
- href="https://www.bytebase.com/docs/administration/mail-delivery?source=console"
- target="__BLANK"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4 ml-1" />
- </a>
- </div>
- <div class="w-full flex flex-col gap-y-6">
- <!-- Host and Port -->
- <div class="w-full flex flex-row gap-4">
- <div class="min-w-max w-80">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.smtp-server-host") }}
- <span class="text-red-600">*</span>
- </div>
- <NInput
- v-model:value="state.mailDeliverySetting.server"
- class="text-main w-full h-max mt-2"
- :placeholder="'smtp.gmail.com'"
- />
- </div>
- <div class="min-w-max w-48">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.smtp-server-port") }}
- <span class="text-red-600">*</span>
- </div>
- <NInputNumber
- id="port"
- v-model:value="state.mailDeliverySetting.port"
- :show-button="false"
- :placeholder="'587'"
- :required="true"
- name="port"
- class="text-main w-full h-max mt-2 rounded-md border-control-border focus:ring-control focus:border-control disabled:bg-gray-50"
- />
- </div>
- </div>
- <div class="w-full flex flex-row gap-4">
- <div class="min-w-max w-80">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.from") }}
- <span class="text-red-600">*</span>
- </div>
- <NInput
- v-model:value="state.mailDeliverySetting.from"
- class="text-main w-full h-max mt-2"
- :placeholder="'[email protected]'"
- />
- </div>
- </div>
- <!-- Authentication Related -->
- <div class="w-full gap-4">
- <div class="min-w-max w-80">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.authentication-method") }}
- </div>
- <NSelect
- class="mt-2"
- :value="getSelectedAuthenticationTypeItem"
- :options="authenticationTypeOptions"
- :virtual-scroll="true"
- :fallback-option="false"
- @update:value="handleSelectAuthenticationType"
- />
- </div>
+ <div class="h-full flex flex-col">
+ <div class="w-full space-y-4 flex-1">
+ <div class="textinfolabel">
+ {{ $t("settings.mail-delivery.description") }}
+ <a
+ class="normal-link inline-flex items-center"
+ href="https://www.bytebase.com/docs/administration/mail-delivery?source=console"
+ target="__BLANK"
+ >
+ {{ $t("common.learn-more") }}
+ <heroicons-outline:external-link class="w-4 h-4 ml-1" />
+ </a>
</div>
- <!-- Not NONE Authentication-->
- <template
- v-if="
- state.mailDeliverySetting.authentication !==
- SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_NONE
- "
- >
+ <div class="w-full flex flex-col gap-y-6">
+ <!-- Host and Port -->
<div class="w-full flex flex-row gap-4">
<div class="min-w-max w-80">
- <div class="flex flex-row">
- <label class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.smtp-username") }}
- <span class="text-red-600">*</span>
- </label>
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.smtp-server-host") }}
+ <span class="text-red-600">*</span>
</div>
<NInput
- v-model:value="state.mailDeliverySetting.username"
+ v-model:value="state.mailDeliverySetting.server"
class="text-main w-full h-max mt-2"
- :placeholder="'[email protected]'"
+ :placeholder="'smtp.gmail.com'"
+ />
+ </div>
+ <div class="min-w-max w-48">
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.smtp-server-port") }}
+ <span class="text-red-600">*</span>
+ </div>
+ <NInputNumber
+ id="port"
+ v-model:value="state.mailDeliverySetting.port"
+ :show-button="false"
+ :placeholder="'587'"
+ :required="true"
+ name="port"
+ class="text-main w-full h-max mt-2 rounded-md border-control-border focus:ring-control focus:border-control disabled:bg-gray-50"
/>
</div>
+ </div>
+ <div class="w-full flex flex-row gap-4">
<div class="min-w-max w-80">
- <div class="flex flex-row space-x-2">
- <label class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.smtp-password") }}
- <span class="text-red-600">*</span>
- </label>
- <NCheckbox
- :label="$t('common.empty')"
- :checked="state.useEmptyPassword"
- @update:checked="handleToggleUseEmptyPassword"
- />
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.from") }}
+ <span class="text-red-600">*</span>
</div>
- <BBTextField
- v-model:value="state.mailDeliverySetting.password"
+ <NInput
+ v-model:value="state.mailDeliverySetting.from"
class="text-main w-full h-max mt-2"
- :disabled="state.useEmptyPassword"
- :required="isCreating"
- :placeholder="'PASSWORD - INPUT_ONLY'"
+ :placeholder="'[email protected]'"
/>
</div>
</div>
- </template>
- <!-- Encryption Related -->
- <div class="w-full gap-4">
- <div class="min-w-max w-80">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.encryption") }}
+ <!-- Authentication Related -->
+ <div class="w-full gap-4">
+ <div class="min-w-max w-80">
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.authentication-method") }}
+ </div>
+ <NSelect
+ class="mt-2"
+ :value="getSelectedAuthenticationTypeItem"
+ :options="authenticationTypeOptions"
+ :virtual-scroll="true"
+ :fallback-option="false"
+ @update:value="handleSelectAuthenticationType"
+ />
</div>
- <NSelect
- class="mt-2"
- :value="getSelectedEncryptionTypeItem"
- :options="encryptionTypeOptions"
- :virtual-scroll="true"
- :fallback-option="false"
- @update:value="handleSelectEncryptionType"
- />
</div>
- </div>
- <!-- Test Send Email To Someone -->
- <div class="w-full gap-4 flex flex-row">
- <div class="min-w-max w-160">
- <div class="textlabel pl-1">
- {{ $t("settings.mail-delivery.field.send-test-email-to") }}
+ <!-- Not NONE Authentication-->
+ <template
+ v-if="
+ state.mailDeliverySetting.authentication !==
+ SMTPMailDeliverySettingValue_Authentication.AUTHENTICATION_NONE
+ "
+ >
+ <div class="w-full flex flex-row gap-4">
+ <div class="min-w-max w-80">
+ <div class="flex flex-row">
+ <label class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.smtp-username") }}
+ <span class="text-red-600">*</span>
+ </label>
+ </div>
+ <NInput
+ v-model:value="state.mailDeliverySetting.username"
+ class="text-main w-full h-max mt-2"
+ :placeholder="'[email protected]'"
+ />
+ </div>
+ <div class="min-w-max w-80">
+ <div class="flex flex-row space-x-2">
+ <label class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.smtp-password") }}
+ <span class="text-red-600">*</span>
+ </label>
+ <NCheckbox
+ :label="$t('common.empty')"
+ :checked="state.useEmptyPassword"
+ @update:checked="handleToggleUseEmptyPassword"
+ />
+ </div>
+ <BBTextField
+ v-model:value="state.mailDeliverySetting.password"
+ class="text-main w-full h-max mt-2"
+ :disabled="state.useEmptyPassword"
+ :required="isCreating"
+ :placeholder="'PASSWORD - INPUT_ONLY'"
+ />
+ </div>
</div>
- <div class="flex flex-row justify-start items-center mt-2 space-x-4">
- <NInput
- v-model:value="state.testMailTo"
- class="text-main h-max w-80"
- :placeholder="'[email protected]'"
+ </template>
+ <!-- Encryption Related -->
+ <div class="w-full gap-4">
+ <div class="min-w-max w-80">
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.encryption") }}
+ </div>
+ <NSelect
+ class="mt-2"
+ :value="getSelectedEncryptionTypeItem"
+ :options="encryptionTypeOptions"
+ :virtual-scroll="true"
+ :fallback-option="false"
+ @update:value="handleSelectEncryptionType"
/>
- <NButton
- type="primary"
- :disabled="
- state.testMailTo === '' || state.isCreateOrUpdateLoading
- "
- :loading="state.isSendLoading"
- @click.prevent="testMailDeliverySetting"
+ </div>
+ </div>
+ <!-- Test Send Email To Someone -->
+ <div class="w-full gap-4 flex flex-row">
+ <div class="min-w-max w-160">
+ <div class="textlabel pl-1">
+ {{ $t("settings.mail-delivery.field.send-test-email-to") }}
+ </div>
+ <div
+ class="flex flex-row justify-start items-center mt-2 space-x-4"
>
- {{ $t("settings.mail-delivery.field.send") }}
- </NButton>
- <BBSpin v-if="state.isSendLoading" class="ml-2" />
+ <NInput
+ v-model:value="state.testMailTo"
+ class="text-main h-max w-80"
+ :placeholder="'[email protected]'"
+ />
+ <NButton
+ type="primary"
+ :disabled="
+ state.testMailTo === '' || state.isCreateOrUpdateLoading
+ "
+ :loading="state.isSendLoading"
+ @click.prevent="testMailDeliverySetting"
+ >
+ {{ $t("settings.mail-delivery.field.send") }}
+ </NButton>
+ <BBSpin v-if="state.isSendLoading" class="ml-2" />
+ </div>
</div>
</div>
</div>
- <div class="flex border-t pt-4 flex-row w-full justify-end space-x-3">
+ </div>
+ <div class="space-y-6 w-full sticky bottom-0 bg-white">
+ <NDivider />
+ <div class="flex justify-end items-center pb-2">
<NButton
v-if="
!isCreating &&
@@ -181,7 +188,14 @@
<script lang="ts" setup>
import { cloneDeep, isEqual } from "lodash-es";
import type { SelectOption } from "naive-ui";
-import { NButton, NCheckbox, NInput, NInputNumber, NSelect } from "naive-ui";
+import {
+ NButton,
+ NCheckbox,
+ NInput,
+ NInputNumber,
+ NSelect,
+ NDivider,
+} from "naive-ui";
import type { ClientError } from "nice-grpc-web";
import { computed, onMounted, reactive } from "vue";
import { useI18n } from "vue-i18n";
diff --git a/frontend/src/views/SettingWorkspaceSQLReview.vue b/frontend/src/views/SettingWorkspaceSQLReview.vue
index 7a3f01b2da..2c92dd32c1 100644
--- a/frontend/src/views/SettingWorkspaceSQLReview.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReview.vue
@@ -1,5 +1,17 @@
<template>
<div class="mx-auto space-y-4">
+ <div class="textinfolabel">
+ {{ $t("sql-review.description") }}
+ <a
+ href="https://www.bytebase.com/docs/sql-review/review-rules"
+ target="_blank"
+ class="normal-link inline-flex flex-row items-center"
+ >
+ {{ $t("common.learn-more") }}
+ <heroicons-outline:external-link class="w-4 h-4" />
+ </a>
+ </div>
+
<div class="flex justify-end items-center space-x-2">
<SearchBox
v-model:value="searchText"
@@ -15,18 +27,6 @@
</NButton>
</div>
- <div class="textinfolabel">
- {{ $t("sql-review.description") }}
- <a
- href="https://www.bytebase.com/docs/sql-review/review-rules"
- target="_blank"
- class="normal-link inline-flex flex-row items-center"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </div>
-
<SQLReviewPolicyTable
v-if="sqlReviewStore.reviewPolicyList.length > 0"
:review-list="filteredReviewConfigList"
diff --git a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
index 754dba8842..62ec9d73af 100644
--- a/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReviewCreate.vue
@@ -1,8 +1,8 @@
<template>
- <div class="space-y-4">
- <FeatureAttention custom-class="mb-4" feature="bb.feature.sql-review" />
+ <div class="space-y-4 h-full flex flex-col">
+ <FeatureAttention feature="bb.feature.sql-review" />
<SQLReviewCreation
- class="mt-1"
+ class="flex-1"
:selected-rule-list="[]"
:selected-resources="attachedResources"
/>
diff --git a/frontend/src/views/SettingWorkspaceVCS.vue b/frontend/src/views/SettingWorkspaceVCS.vue
index 76e4e99cb2..95ea702642 100644
--- a/frontend/src/views/SettingWorkspaceVCS.vue
+++ b/frontend/src/views/SettingWorkspaceVCS.vue
@@ -1,5 +1,5 @@
<template>
- <div class="space-y-4">
+ <div class="space-y-4 h-full flex flex-col">
<div class="textinfolabel">
{{ $t("gitops.setting.description") }}
<LearnMoreLink
@@ -26,7 +26,7 @@
:striped="true"
:bordered="true"
/>
- <VCSSetupWizard v-else :show-cancel="false" />
+ <VCSSetupWizard class="flex-1" v-else :show-cancel="false" />
</div>
</template>
diff --git a/frontend/src/views/SettingWorkspaceVCSCreate.vue b/frontend/src/views/SettingWorkspaceVCSCreate.vue
index 4ca6a4359e..fd1832fb15 100644
--- a/frontend/src/views/SettingWorkspaceVCSCreate.vue
+++ b/frontend/src/views/SettingWorkspaceVCSCreate.vue
@@ -1,5 +1,5 @@
<template>
- <div class="space-y-4 divide-y divide-block-border">
+ <div class="space-y-4 h-full flex flex-col">
<BBAttention type="info">
<div class="textinfolabel">
{{ $t("gitops.setting.add-git-provider.description") }}
@@ -9,9 +9,7 @@
/>
</div>
</BBAttention>
- <div class="pt-4">
- <VCSSetupWizard />
- </div>
+ <VCSSetupWizard class="flex-1" :show-cancel="true" />
</div>
</template>
diff --git a/frontend/src/views/project/ProjectDatabaseGroupCreate.vue b/frontend/src/views/project/ProjectDatabaseGroupCreate.vue
index a034b8ced7..75e0c441ba 100644
--- a/frontend/src/views/project/ProjectDatabaseGroupCreate.vue
+++ b/frontend/src/views/project/ProjectDatabaseGroupCreate.vue
@@ -1,9 +1,14 @@
<template>
- <DatabaseGroupForm
- ref="formRef"
- :project="project"
- @dismiss="() => router.back()"
- @created="(databaseGroupName: string) => {
+ <div class="h-full flex flex-col">
+ <div class="text-lg leading-6 font-medium text-main">
+ {{ $t("database-group.create") }}
+ </div>
+ <NDivider />
+ <DatabaseGroupForm
+ class="flex-1"
+ :project="project"
+ @dismiss="() => router.back()"
+ @created="(databaseGroupName: string) => {
router.push({
name: PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,
params: {
@@ -11,10 +16,12 @@
},
});
}"
- />
+ />
+ </div>
</template>
<script lang="tsx" setup>
+import { NDivider } from "naive-ui";
import { computed } from "vue";
import { useRouter } from "vue-router";
import DatabaseGroupForm from "@/components/DatabaseGroup/DatabaseGroupForm.vue";
diff --git a/frontend/src/views/project/ProjectDatabaseMaskingAccessCreate.vue b/frontend/src/views/project/ProjectDatabaseMaskingAccessCreate.vue
index c5962f5fa6..453e113535 100644
--- a/frontend/src/views/project/ProjectDatabaseMaskingAccessCreate.vue
+++ b/frontend/src/views/project/ProjectDatabaseMaskingAccessCreate.vue
@@ -1,12 +1,20 @@
<template>
- <GrantAccessForm
- :column-list="[]"
- :project-name="project.name"
- @dismiss="() => router.back()"
- />
+ <div class="h-full flex flex-col">
+ <div class="text-lg leading-6 font-medium text-main">
+ {{ $t("project.masking-access.grant-access") }}
+ </div>
+ <NDivider />
+ <GrantAccessForm
+ class="flex-1"
+ :column-list="[]"
+ :project-name="project.name"
+ @dismiss="() => router.back()"
+ />
+ </div>
</template>
<script lang="tsx" setup>
+import { NDivider } from "naive-ui";
import { computed } from "vue";
import { useRouter } from "vue-router";
import GrantAccessForm from "@/components/SensitiveData/GrantAccessForm.vue";
diff --git a/frontend/src/views/project/ProjectWebhookCreate.vue b/frontend/src/views/project/ProjectWebhookCreate.vue
index eabbcbe256..b02ae4f65b 100644
--- a/frontend/src/views/project/ProjectWebhookCreate.vue
+++ b/frontend/src/views/project/ProjectWebhookCreate.vue
@@ -1,10 +1,11 @@
<template>
- <div class="space-y-4 divide-y divide-block-border">
- <div class="text-xl leading-6 font-medium text-main">
+ <div class="h-full flex flex-col">
+ <div class="text-lg leading-6 font-medium text-main">
{{ $t("project.webhook.creation.title") }}
</div>
+ <NDivider />
<ProjectWebhookForm
- class="pt-4"
+ class="flex-1"
:create="true"
:project="project"
:webhook="defaultNewWebhook"
@@ -13,6 +14,7 @@
</template>
<script lang="ts" setup>
+import { NDivider } from "naive-ui";
import { computed } from "vue";
import ProjectWebhookForm from "@/components/ProjectWebhookForm.vue";
import { useProjectByName } from "@/store";