Skip to content

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

chore: ui update for setting page (#9519)

ecmadao931f8cb092bb
diff --git a/frontend/src/components/Breadcrumb.vue b/frontend/src/components/Breadcrumb.vue
index 39fbf9e069..27387b7589 100644
--- a/frontend/src/components/Breadcrumb.vue
+++ b/frontend/src/components/Breadcrumb.vue
@@ -44,7 +44,7 @@
<NTooltip v-if="helpName">
<template #trigger>
- <HelpTriggerIcon class="ml-1" :id="helpName" :is-guide="true" />
+ <HelpTriggerIcon :id="helpName" class="ml-1" :is-guide="true" />
</template>
{{ $t("common.show-help") }}
</NTooltip>
diff --git a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
index d2b81bc53b..bea2885f51 100644
--- a/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
+++ b/frontend/src/components/GeneralSetting/AIAugmentationSetting.vue
@@ -1,9 +1,12 @@
<template>
<div ref="containerRef" class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
- <h1 class="text-2xl font-bold">
- {{ $t("settings.general.workspace.plugin.openai.ai-augmentation") }}
- </h1>
+ <div class="flex items-center space-x-2">
+ <h1 class="text-2xl font-bold">
+ {{ $t("settings.general.workspace.plugin.openai.ai-augmentation") }}
+ </h1>
+ <FeatureBadge feature="bb.feature.plugin.openai" />
+ </div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{ $t("settings.general.workspace.only-admin-can-edit") }}
</span>
@@ -18,8 +21,6 @@
$t("settings.general.workspace.plugin.openai.openai-key.self")
}}</span>
- <FeatureBadge feature="bb.feature.plugin.openai" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -45,16 +46,15 @@
</template>
</i18n-t>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.openAIKey"
class="mb-4 w-full"
:disabled="!allowEdit"
- :value="state.openAIKey"
:placeholder="
$t(
'settings.general.workspace.plugin.openai.openai-key.placeholder'
)
"
- @input="handleOpenAIKeyChange"
/>
<label
class="flex items-center gap-x-2 tooltip-wrapper"
@@ -64,8 +64,6 @@
$t("settings.general.workspace.plugin.openai.openai-endpoint.self")
}}</span>
- <FeatureBadge feature="bb.feature.plugin.openai" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -80,11 +78,10 @@
)
}}
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.openAIEndpoint"
class="mb-4 w-full"
:disabled="!allowEdit"
- :value="state.openAIEndpoint"
- @input="handleOpenAIEndpointChange"
/>
<div class="flex justify-end">
<NButton
@@ -165,14 +162,6 @@ function maskKey(key: string | undefined): string {
return key ? key.slice(0, 3) + "***" + key.slice(-4) : "";
}
-const handleOpenAIKeyChange = (event: Event) => {
- state.openAIKey = (event.target as HTMLInputElement).value;
-};
-
-const handleOpenAIEndpointChange = (event: Event) => {
- state.openAIEndpoint = (event.target as HTMLInputElement).value;
-};
-
const updateOpenAIKeyEndpoint = async () => {
// Always allow to unset the key.
const isUnset = state.openAIKey === "" && state.openAIEndpoint === "";
diff --git a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
index 0e61ed6f68..ece38d77b0 100644
--- a/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
+++ b/frontend/src/components/GeneralSetting/AnnouncementSetting.vue
@@ -1,9 +1,13 @@
<template>
<div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
- <h1 class="text-2xl font-bold">
- {{ $t("settings.general.workspace.announcement.self") }}
- </h1>
+ <div class="flex items-center space-x-2">
+ <h1 class="text-2xl font-bold">
+ {{ $t("settings.general.workspace.announcement.self") }}
+ </h1>
+ <FeatureBadge feature="bb.feature.announcement" />
+ </div>
+
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{
$t("settings.general.workspace.announcement.admin-or-dba-can-edit")
@@ -21,7 +25,6 @@
"settings.general.workspace.announcement-alert-level.description"
)
}}</span>
- <FeatureBadge feature="bb.feature.announcement" />
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -48,8 +51,6 @@
>{{ $t("settings.general.workspace.announcement-text.self") }}
</span>
- <FeatureBadge feature="bb.feature.announcement" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -64,14 +65,13 @@
<div class="mb-3 text-sm text-gray-400">
{{ $t("settings.general.workspace.announcement-text.description") }}
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.announcement.text"
class="mb-3 w-full"
:placeholder="
$t('settings.general.workspace.announcement-text.placeholder')
"
:disabled="!allowEdit"
- :value="state.announcement.text"
- @input="handleAnnouncementContentChange"
/>
<label
@@ -82,8 +82,6 @@
$t("settings.general.workspace.extra-link.self")
}}</span>
- <FeatureBadge feature="bb.feature.announcement" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -95,12 +93,11 @@
}}
</span>
</label>
- <BBTextField
+ <NInput
+ v-model:value="state.announcement.link"
class="mb-5 w-full"
:placeholder="$t('settings.general.workspace.extra-link.placeholder')"
:disabled="!allowEdit"
- :value="state.announcement.link"
- @input="handleExtraDetailsChange"
/>
<div class="flex justify-end">
@@ -191,14 +188,6 @@ const allowSave = computed((): boolean => {
);
});
-const handleAnnouncementContentChange = (event: Event) => {
- state.announcement.text = (event.target as HTMLInputElement).value;
-};
-
-const handleExtraDetailsChange = (event: Event) => {
- state.announcement.link = (event.target as HTMLInputElement).value;
-};
-
const updateAnnouncementSetting = async () => {
if (!hasAnnouncementSetting.value) {
state.showFeatureModal = true;
diff --git a/frontend/src/components/GeneralSetting/BrandingSetting.vue b/frontend/src/components/GeneralSetting/BrandingSetting.vue
index 6e096ae6ec..ed44552991 100644
--- a/frontend/src/components/GeneralSetting/BrandingSetting.vue
+++ b/frontend/src/components/GeneralSetting/BrandingSetting.vue
@@ -1,9 +1,12 @@
<template>
<div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
- <h1 class="text-2xl font-bold">
- {{ $t("settings.general.workspace.branding") }}
- </h1>
+ <div class="flex items-center space-x-2">
+ <h1 class="text-2xl font-bold">
+ {{ $t("settings.general.workspace.branding") }}
+ </h1>
+ <FeatureBadge feature="bb.feature.branding" />
+ </div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{ $t("settings.general.workspace.only-admin-can-edit") }}
</span>
diff --git a/frontend/src/components/GeneralSetting/NetworkSetting.vue b/frontend/src/components/GeneralSetting/NetworkSetting.vue
index 5fbf11b0e9..4ef2db0694 100644
--- a/frontend/src/components/GeneralSetting/NetworkSetting.vue
+++ b/frontend/src/components/GeneralSetting/NetworkSetting.vue
@@ -31,11 +31,10 @@
url="https://www.bytebase.com/docs/get-started/install/external-url?source=console"
/>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.externalUrl"
class="mb-4 w-full"
:disabled="!allowEdit"
- :value="state.externalUrl"
- @input="handleExternalUrlChange"
/>
<label
@@ -59,7 +58,8 @@
url="https://www.bytebase.com/docs/get-started/install/external-url#gitops-webhook-url?source=console"
/>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.gitopsWebhookUrl"
class="mb-4 w-full"
:placeholder="
t(
@@ -67,8 +67,6 @@
)
"
:disabled="!allowEdit"
- :value="state.gitopsWebhookUrl"
- @input="handleGitOpsWebhookUrlChange"
/>
<div class="flex justify-end">
@@ -134,14 +132,6 @@ const allowSave = computed((): boolean => {
return externalUrlChanged || gitopsWebhookUrlChanged;
});
-const handleExternalUrlChange = (event: Event) => {
- state.externalUrl = (event.target as HTMLInputElement).value;
-};
-
-const handleGitOpsWebhookUrlChange = (event: Event) => {
- state.gitopsWebhookUrl = (event.target as HTMLInputElement).value;
-};
-
const updateNetworkSetting = async () => {
if (!allowSave.value) {
return;
diff --git a/frontend/src/components/GeneralSetting/SecuritySetting.vue b/frontend/src/components/GeneralSetting/SecuritySetting.vue
index 30dac8c9b9..8097b6c38c 100644
--- a/frontend/src/components/GeneralSetting/SecuritySetting.vue
+++ b/frontend/src/components/GeneralSetting/SecuritySetting.vue
@@ -1,9 +1,12 @@
<template>
<div class="py-6 lg:flex">
<div class="text-left lg:w-1/4">
- <h1 class="text-2xl font-bold">
- {{ $t("settings.general.workspace.security") }}
- </h1>
+ <div class="flex items-center space-x-2">
+ <h1 class="text-2xl font-bold">
+ {{ $t("settings.general.workspace.security") }}
+ </h1>
+ <FeatureBadge feature="bb.feature.watermark" />
+ </div>
<span v-if="!allowEdit" class="text-sm text-gray-400">
{{ $t("settings.general.workspace.only-admin-can-edit") }}
</span>
@@ -23,8 +26,6 @@
$t("settings.general.workspace.watermark.enable")
}}</span>
- <FeatureBadge feature="bb.feature.watermark" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -50,8 +51,6 @@
$t("settings.general.workspace.disallow-signup.enable")
}}</span>
- <FeatureBadge feature="bb.feature.disallow-signup" />
-
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
@@ -76,7 +75,6 @@
<span class="font-medium">{{
$t("settings.general.workspace.require-2fa.enable")
}}</span>
- <FeatureBadge feature="bb.feature.2fa" />
<span
v-if="!allowEdit"
class="text-sm text-gray-400 -translate-y-2 tooltip"
diff --git a/frontend/src/components/IdentityProviderCreateForm.vue b/frontend/src/components/IdentityProviderCreateForm.vue
index 6d5a688790..bf606fb10e 100644
--- a/frontend/src/components/IdentityProviderCreateForm.vue
+++ b/frontend/src/components/IdentityProviderCreateForm.vue
@@ -6,7 +6,7 @@
v-if="isCreating"
class="w-full flex flex-col justify-start items-start"
>
- <div class="w-full flex flex-row justify-between items-center">
+ <div class="w-full flex flex-row items-center space-x-2">
<p class="textlabel my-2">{{ $t("settings.sso.form.type") }}</p>
<a
v-if="userDocLink"
diff --git a/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue b/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
index 746583cc2f..30042ad709 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceRoleTable/InstanceRoleTable.vue
@@ -1,5 +1,6 @@
<template>
<BBGrid
+ class="border"
:column-list="columnList"
:data-source="instanceRoleList"
:row-clickable="false"
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 92e1590df3..fee5d3baba 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2375,8 +2375,8 @@
"start-n-days-trial": "Start {days} days trial (no credit card required)",
"successfully-start-trial": "Successfully start free trial for {days} days",
"successfully-upgrade-trial": "Successfully upgrade free trial to {plan}",
- "require-subscription": "This feature requires {requiredPlan}, please purchase Bytebase license to unlock this feature.",
- "feature-require-subscription": "{feature} requires {requiredPlan}.",
+ "require-subscription": "This feature requires {requiredPlan} subscription, please purchase Bytebase license to unlock this feature.",
+ "feature-require-subscription": "{feature} requires {requiredPlan} subscription.",
"required-plan-with-trial": "This feature requires {requiredPlan}. {startTrial}",
"trial-for-plan": "You can start a free trial for {plan} with {days} days - no credit card required.",
"trial-for-days": "You can start a free trial for {days} days - no credit card required.",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 85e0f4a34d..e43d2628d6 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2371,8 +2371,8 @@
"start-n-days-trial": "Comienza una prueba de {days} días (no se requiere tarjeta de crédito)",
"successfully-start-trial": "Prueba gratuita iniciada con éxito por {days} días",
"successfully-upgrade-trial": "Prueba gratuita actualizada con éxito a {plan}",
- "require-subscription": "Esta función requiere {requiredPlan}, por favor compra la licencia Bytebase para desbloquear esta función.",
- "feature-require-subscription": "{feature} requiere {requiredPlan}.",
+ "require-subscription": "Esta función requiere una suscripción a {requiredPlan}. Compre una licencia de Bytebase para desbloquear esta función.",
+ "feature-require-subscription": "{feature} requiere suscripción a {requiredPlan}.",
"required-plan-with-trial": "Esta función requiere {requiredPlan}. {startTrial}",
"trial-for-plan": "Puedes iniciar una prueba gratuita de {plan} por {days} días - no se requiere tarjeta de crédito.",
"trial-for-days": "Puedes iniciar una prueba gratuita por {days} días - no se requiere tarjeta de crédito.",
diff --git a/frontend/src/views/DashboardSidebar.vue b/frontend/src/views/DashboardSidebar.vue
index 75d148cd8d..8852527a0a 100644
--- a/frontend/src/views/DashboardSidebar.vue
+++ b/frontend/src/views/DashboardSidebar.vue
@@ -28,6 +28,7 @@
v-if="shouldShowInstanceEntry"
to="/instance"
class="outline-item group flex items-center"
+ :class="getRouteLinkClass('/instance')"
>
<div
class="outline-item group flex items-center px-2 py-1.5 capitalize"
@@ -107,7 +108,7 @@ import {
SquareStackIcon,
} from "lucide-vue-next";
import { computed } from "vue";
-import { RouterLink } from "vue-router";
+import { RouterLink, useRoute } from "vue-router";
import BytebaseLogo from "@/components/BytebaseLogo.vue";
import {
useCurrentUserV1,
@@ -117,6 +118,7 @@ import {
import { hasWorkspacePermissionV1 } from "../utils";
const currentUserV1 = useCurrentUserV1();
+const route = useRoute();
// Only show sync schema if the user has permission to alter schema of at least one project.
const shouldShowSyncSchemaEntry = computed(() => {
@@ -135,4 +137,14 @@ const shouldShowInstanceEntry = computed(() => {
currentUserV1.value.userRole
);
});
+
+const getRouteLinkClass = (prefix: string): string[] => {
+ const { path } = route;
+ const isActiveRoute = path === prefix || path.startsWith(`${prefix}/`);
+ const classes: string[] = [];
+ if (isActiveRoute) {
+ classes.push("router-link-active", "bg-link-hover");
+ }
+ return classes;
+};
</script>
diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vue
index 9bb1dec161..8bb5f5965c 100644
--- a/frontend/src/views/DatabaseDashboard.vue
+++ b/frontend/src/views/DatabaseDashboard.vue
@@ -64,6 +64,7 @@
<DatabaseV1Table
pagination-class="mb-4"
+ table-class="border-y"
:database-list="filteredDatabaseList"
:database-group-list="filteredDatabaseGroupList"
:show-placeholder="true"
diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vue
index 202b9dcc1c..f3e2d6941f 100644
--- a/frontend/src/views/InstanceDetail.vue
+++ b/frontend/src/views/InstanceDetail.vue
@@ -40,6 +40,7 @@
<NTabPane name="DATABASES" :tab="$t('common.databases')">
<DatabaseV1Table
mode="INSTANCE"
+ table-class="border"
:scroll-on-page-change="false"
:database-list="databaseV1List"
/>
diff --git a/frontend/src/views/SchemaTemplate/ColumnTypes.vue b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
index aaa200336f..9f59c49dd6 100644
--- a/frontend/src/views/SchemaTemplate/ColumnTypes.vue
+++ b/frontend/src/views/SchemaTemplate/ColumnTypes.vue
@@ -56,7 +56,7 @@
</NButton>
</div>
</div>
- <NDivider class="w-full" />
+ <NDivider class="w-full py-2" />
<div class="w-full flex flex-col justify-start items-start gap-2">
<div class="w-full flex flex-row justify-between items-center">
<div class="flex flex-row justify-start items-center">
diff --git a/frontend/src/views/SchemaTemplate/FieldTemplates.vue b/frontend/src/views/SchemaTemplate/FieldTemplates.vue
index 0443d3cf8c..3e5825620f 100644
--- a/frontend/src/views/SchemaTemplate/FieldTemplates.vue
+++ b/frontend/src/views/SchemaTemplate/FieldTemplates.vue
@@ -12,7 +12,7 @@
</div>
</div>
</div>
- <div class="flex items-center justify-between gap-x-2 my-4 pb-5 border-b">
+ <div class="flex items-center justify-between gap-x-2 my-4">
<div class="flex flex-row items-center justify-start gap-x-4">
<template v-if="showEngineFilter">
<NCheckbox
diff --git a/frontend/src/views/SchemaTemplate/TableTemplates.vue b/frontend/src/views/SchemaTemplate/TableTemplates.vue
index 6524641a5b..f22405fe2f 100644
--- a/frontend/src/views/SchemaTemplate/TableTemplates.vue
+++ b/frontend/src/views/SchemaTemplate/TableTemplates.vue
@@ -16,7 +16,7 @@
</div>
</div>
</div>
- <div class="flex items-center justify-between gap-x-2 my-4 pb-5 border-b">
+ <div class="flex items-center justify-between gap-x-2 my-4">
<div class="flex flex-row items-center justify-start gap-x-4">
<template v-if="showEngineFilter">
<NCheckbox
diff --git a/frontend/src/views/SettingWorkspaceMailDelivery.vue b/frontend/src/views/SettingWorkspaceMailDelivery.vue
index 7b3e0e3646..677c9739ca 100644
--- a/frontend/src/views/SettingWorkspaceMailDelivery.vue
+++ b/frontend/src/views/SettingWorkspaceMailDelivery.vue
@@ -19,12 +19,10 @@
{{ $t("settings.mail-delivery.field.smtp-server-host") }}
<span class="text-red-600">*</span>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.mailDeliverySetting.server"
class="text-main w-full h-max mt-2"
:placeholder="'smtp.gmail.com'"
- :value="state.mailDeliverySetting.server"
- @input="(e: any) =>
- state.mailDeliverySetting.server = e.target.value"
/>
</div>
<div class="min-w-max w-48">
@@ -32,16 +30,15 @@
{{ $t("settings.mail-delivery.field.smtp-server-port") }}
<span class="text-red-600">*</span>
</div>
- <input
+ <NInput
id="port"
+ v-model:value="state.mailDeliverySetting.port"
type="number"
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"
:placeholder="'587'"
:required="true"
- :value="state.mailDeliverySetting.port"
@wheel="(event: MouseEvent) => {(event.target as HTMLInputElement).blur()}"
- @input="(event) => {state.mailDeliverySetting.port = (event.target as HTMLInputElement).valueAsNumber}"
/>
</div>
</div>
@@ -51,11 +48,10 @@
{{ $t("settings.mail-delivery.field.from") }}
<span class="text-red-600">*</span>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.mailDeliverySetting.from"
class="text-main w-full h-max mt-2"
:placeholder="'[email protected]'"
- :value="state.mailDeliverySetting.from"
- @input="(e: any) => state.mailDeliverySetting.from = e.target.value"
/>
</div>
</div>
@@ -65,20 +61,14 @@
<div class="textlabel pl-1">
{{ $t("settings.mail-delivery.field.authentication-method") }}
</div>
- <BBSelect
+ <NSelect
class="mt-2"
- :selected-item="getSelectedAuthenticationTypeItem"
- :item-list="['NONE', 'PLAIN', 'LOGIN', 'CRAM-MD5']"
- :disabled="false"
- :show-prefix-item="true"
- @select-item="handleSelectAuthenticationType"
- >
- <template #menuItem="{ item }">
- <div class="text-main flex items-center gap-x-2">
- {{ item }}
- </div>
- </template></BBSelect
- >
+ :value="getSelectedAuthenticationTypeItem"
+ :options="authenticationTypeOptions"
+ :virtual-scroll="true"
+ :fallback-option="false"
+ @update:value="handleSelectAuthenticationType"
+ />
</div>
</div>
<!-- Not NONE Authentication-->
@@ -96,11 +86,10 @@
<span class="text-red-600">*</span>
</label>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.mailDeliverySetting.username"
class="text-main w-full h-max mt-2"
:placeholder="'[email protected]'"
- :value="state.mailDeliverySetting.username"
- @input="(e: any) => state.mailDeliverySetting.username = e.target.value"
/>
</div>
<div class="min-w-max w-80">
@@ -115,12 +104,11 @@
@toggle="handleToggleUseEmptyPassword"
/>
</div>
- <BBTextField
+ <NInput
+ v-model:value="state.mailDeliverySetting.password"
class="text-main w-full h-max mt-2"
:disabled="state.useEmptyPassword"
:placeholder="'PASSWORD - INPUT_ONLY'"
- :value="state.mailDeliverySetting.password"
- @input="(e: any) => state.mailDeliverySetting.password = e.target.value"
/>
</div>
</div>
@@ -131,20 +119,14 @@
<div class="textlabel pl-1">
{{ $t("settings.mail-delivery.field.encryption") }}
</div>
- <BBSelect
+ <NSelect
class="mt-2"
- :selected-item="getSelectedEncryptionTypeItem"
- :item-list="['NONE', 'SSL/TLS', 'STARTTLS']"
- :disabled="false"
- :show-prefix-item="true"
- @select-item="handleSelectEncryptionType"
- >
- <template #menuItem="{ item }">
- <div class="text-main flex items-center gap-x-2">
- {{ item }}
- </div>
- </template></BBSelect
- >
+ :value="getSelectedEncryptionTypeItem"
+ :options="encryptionTypeOptions"
+ :virtual-scroll="true"
+ :fallback-option="false"
+ @update:value="handleSelectEncryptionType"
+ />
</div>
</div>
<div class="flex flex-row w-full">
@@ -172,10 +154,9 @@
</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]'"
- :value="state.testMailTo"
- @input="(e: any) => state.testMailTo = e.target.value"
/>
<NButton
type="primary"
@@ -197,10 +178,11 @@
</template>
<script lang="ts" setup>
import { cloneDeep, isEqual } from "lodash-es";
+import { SelectOption } from "naive-ui";
import { ClientError } from "nice-grpc-web";
import { computed, onMounted, reactive } from "vue";
import { useI18n } from "vue-i18n";
-import { BBCheckbox, BBSelect, BBTextField } from "@/bbkit";
+import { BBCheckbox } from "@/bbkit";
import { pushNotification } from "@/store";
import { useWorkspaceMailDeliverySettingStore } from "@/store/modules/workspaceMailDeliverySetting";
import {
@@ -338,6 +320,21 @@ const handleSelectEncryptionType = (method: string) => {
break;
}
};
+
+const encryptionTypeOptions = computed((): SelectOption[] => {
+ return ["NONE", "SSL/TLS", "STARTTLS"].map((item) => ({
+ value: item,
+ label: item,
+ }));
+});
+
+const authenticationTypeOptions = computed((): SelectOption[] => {
+ return ["NONE", "PLAIN", "LOGIN", "CRAM-MD5"].map((item) => ({
+ value: item,
+ label: item,
+ }));
+});
+
const getSelectedEncryptionTypeItem = computed(() => {
switch (state.mailDeliverySetting.encryption) {
case SMTPMailDeliverySettingValue_Encryption.ENCRYPTION_NONE: