Skip to content

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

chore: unify learn more style (#17824)

ecmadaof1e5d30360de
diff --git a/frontend/src/components/DatabaseDetail/DriftedDatabaseAlert.vue b/frontend/src/components/DatabaseDetail/DriftedDatabaseAlert.vue
index 8bcb4ce88c..098d4c6ee3 100644
--- a/frontend/src/components/DatabaseDetail/DriftedDatabaseAlert.vue
+++ b/frontend/src/components/DatabaseDetail/DriftedDatabaseAlert.vue
@@ -7,13 +7,10 @@
<div class="flex items-center justify-between gap-4">
<div class="flex-1">
{{ $t("database.drifted.schema-drift-detected.description") }}
- <a
- href="https://docs.bytebase.com/change-database/drift-detection/?source=console"
- target="_blank"
- class="text-accent hover:underline ml-1"
- >
- {{ $t("common.learn-more") }}
- </a>
+ <LearnMoreLink
+ class="ml-1"
+ url="https://docs.bytebase.com/change-database/drift-detection/?source=console"
+ />
</div>
<div class="flex justify-end items-center gap-2">
<NButton size="small" @click="state.showSchemaDiffModal = true">
@@ -59,6 +56,7 @@ import { NAlert, NButton } from "naive-ui";
import { reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { BBModal } from "@/bbkit";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { DiffEditor } from "@/components/MonacoEditor";
import {
pushNotification,
diff --git a/frontend/src/components/EnvironmentForm/Form.vue b/frontend/src/components/EnvironmentForm/Form.vue
index 27bd976486..d902869f3d 100644
--- a/frontend/src/components/EnvironmentForm/Form.vue
+++ b/frontend/src/components/EnvironmentForm/Form.vue
@@ -34,22 +34,21 @@
</div>
<div v-if="features.includes('TIER')" class="flex flex-col gap-y-2">
- <label class="font-medium flex items-center">
- {{ $t("policy.environment-tier.name") }}
- <FeatureBadge :feature="PlanFeature.FEATURE_ENVIRONMENT_TIERS" />
- </label>
- <p class="text-sm text-gray-600">
- <i18n-t tag="span" keypath="policy.environment-tier.description">
- <template #newline><br /></template>
- </i18n-t>
- <a
- class="inline-flex items-center text-blue-600 ml-1 hover:underline"
- href="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier"
- target="_blank"
- >{{ $t("common.learn-more")
- }}<heroicons-outline:external-link class="w-4 h-4"
- /></a>
- </p>
+ <div class="gap-y-1">
+ <label class="font-medium flex items-center">
+ {{ $t("policy.environment-tier.name") }}
+ <FeatureBadge :feature="PlanFeature.FEATURE_ENVIRONMENT_TIERS" />
+ </label>
+ <p class="text-sm text-gray-600">
+ <i18n-t tag="span" keypath="policy.environment-tier.description">
+ <template #newline><br /></template>
+ </i18n-t>
+ <LearnMoreLink
+ class="ml-1"
+ url="https://docs.bytebase.com/change-database/environment-policy/overview/?source=console#environment-tier"
+ />
+ </p>
+ </div>
<NCheckbox
:checked="state.environment.tags.protected === 'protected'"
:disabled="!allowEdit"
@@ -69,27 +68,27 @@
v-if="features.includes('ROLLOUT_POLICY')"
class="flex flex-col gap-y-2"
>
- <div class="flex items-baseline space-x-2">
- <label class="font-medium">
- {{ $t("policy.rollout.name") }}
- </label>
- <span
- v-show="!create && valueChanged('rolloutPolicy')"
- class="textlabeltip"
- >
- {{ $t("policy.rollout.tip") }}
- </span>
- </div>
- <div class="textinfolabel">
- {{ $t("policy.rollout.info", { permission: "bb.taskRuns.create" }) }}
- <a
- class="inline-flex items-center text-blue-600 ml-1 hover:underline"
- href="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
+ <div class="gap-y-1">
+ <div class="flex items-baseline space-x-2">
+ <label class="font-medium">
+ {{ $t("policy.rollout.name") }}
+ </label>
+ <span
+ v-show="!create && valueChanged('rolloutPolicy')"
+ class="textlabeltip"
+ >
+ {{ $t("policy.rollout.tip") }}
+ </span>
+ </div>
+ <div class="textinfolabel">
+ {{
+ $t("policy.rollout.info", { permission: "bb.taskRuns.create" })
+ }}
+ <LearnMoreLink
+ class="ml-1"
+ url="https://docs.bytebase.com/change-database/environment-policy/rollout-policy/?source=console"
+ />
+ </div>
</div>
<RolloutPolicyConfig
v-model:policy="state.rolloutPolicy"
@@ -155,6 +154,7 @@ import { NCheckbox, NInput, NColorPicker } from "naive-ui";
import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { BBButtonConfirm } from "@/bbkit";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import RequiredStar from "@/components/RequiredStar.vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
import {
diff --git a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
index 60542b1c53..e6bc7531dc 100644
--- a/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
+++ b/frontend/src/components/IdentityProvider/IdentityProviderCreateWizard.vue
@@ -287,13 +287,10 @@
{{
$t("settings.sso.form.user-information-mapping-description")
}}
- <a
- href="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console"
- class="text-blue-600 hover:text-blue-800 underline"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- </a>
+ <LearnMoreLink
+ class="ml-1"
+ url="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console"
+ />
</p>
</div>
@@ -455,6 +452,7 @@ import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { BBAttention, BBTextField } from "@/bbkit";
import { FeatureBadge } from "@/components/FeatureGuard";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import RequiredStar from "@/components/RequiredStar.vue";
import { Drawer, DrawerContent } from "@/components/v2";
import ResourceIdField from "@/components/v2/Form/ResourceIdField.vue";
diff --git a/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue b/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue
index 33800ed7d3..5f92a92b09 100644
--- a/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue
+++ b/frontend/src/components/IdentityProvider/IdentityProviderEditForm.vue
@@ -101,13 +101,10 @@
</h1>
<p class="text-base text-gray-600 mt-3">
{{ $t("settings.sso.form.user-information-mapping-description") }}
- <a
- href="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console"
- class="text-blue-600 hover:text-blue-800 underline ml-1"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- </a>
+ <LearnMoreLink
+ class="ml-1"
+ url="https://docs.bytebase.com/administration/sso/oauth2#user-information-field-mapping?source=console"
+ />
</p>
</div>
<div class="flex-1 mt-4 lg:px-4 lg:mt-0 space-y-6">
@@ -253,6 +250,7 @@ import { computed, reactive, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { BBTextField, BBButtonConfirm } from "@/bbkit";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import RequiredStar from "@/components/RequiredStar.vue";
import { ResourceIdField } from "@/components/v2";
import { WORKSPACE_ROUTE_IDENTITY_PROVIDERS } from "@/router/dashboard/workspaceRoutes";
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index 9c467a3163..babb49d8f8 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -2,14 +2,9 @@
<div class="w-full mx-auto space-y-4">
<div class="textinfolabel">
{{ $t("project.members.description") }}
- <a
- href="https://docs.bytebase.com/administration/roles/?source=console#project-roles"
- 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>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/administration/roles/?source=console#project-roles"
+ />
</div>
<NTabs v-model:value="state.selectedTab" type="bar" animated>
@@ -112,6 +107,7 @@ import { cloneDeep } from "lodash-es";
import { NButton, NTabPane, NTabs, useDialog } from "naive-ui";
import { computed, reactive } from "vue";
import { useI18n } from "vue-i18n";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import MemberDataTable from "@/components/Member/MemberDataTable/index.vue";
import MemberDataTableByRole from "@/components/Member/MemberDataTableByRole.vue";
import type { MemberBinding } from "@/components/Member/types";
diff --git a/frontend/src/components/Role/Setting/RoleSetting.vue b/frontend/src/components/Role/Setting/RoleSetting.vue
index c539ffa65f..b7a609e70f 100644
--- a/frontend/src/components/Role/Setting/RoleSetting.vue
+++ b/frontend/src/components/Role/Setting/RoleSetting.vue
@@ -2,14 +2,9 @@
<div class="space-y-4">
<div class="textinfolabel">
{{ $t("role.setting.description") }}
- <a
- href="https://docs.bytebase.com/administration/roles?source=console"
- class="normal-link text-sm inline-flex flex-row items-center"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/administration/roles?source=console"
+ />
</div>
<div class="w-full flex flex-row justify-end items-center">
<NButton
@@ -63,6 +58,7 @@ import { NButton } from "naive-ui";
import { computed, onMounted, reactive, ref } from "vue";
import { BBSpin } from "@/bbkit";
import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { featureToRef, useRoleStore } from "@/store";
import { PRESET_ROLES } from "@/types";
import type { Role } from "@/types/proto-es/v1/role_service_pb";
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 57fdf8dcbc..4286e2adfe 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1543,7 +1543,7 @@
"rollout": {
"name": "Rollout Policy",
"tip": "The policy is applied to issues retroactively.",
- "info": "Tasks can be executed by users with '{permission}' permission or the following roles",
+ "info": "Tasks can be executed by users with '{permission}' permission or the following roles.",
"auto": "Automatic",
"auto-info": "If all check pass, the change will be rolled out and executed automatically.",
"checkers": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 3e665bb1af..4cd9a054bf 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1543,7 +1543,7 @@
"rollout": {
"name": "Política de Implementación",
"tip": "La política se aplica retrospectivamente a las incidencias.",
- "info": "Las tareas pueden ser ejecutadas por usuarios con el permiso '{permission}' o los siguientes roles",
+ "info": "Las tareas pueden ser ejecutadas por usuarios con el permiso '{permission}' o los siguientes roles.",
"auto": "Automático",
"auto-info": "Si se aprueban todas las comprobaciones, el cambio se implementará y ejecutará automáticamente.",
"checkers": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index a21b0c76d8..06de27044f 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1543,7 +1543,7 @@
"rollout": {
"name": "リリース戦略",
"tip": "新しいポリシーは古いイシューにも適用されます",
- "info": "タスクは、「{permission}」許可または次の役割でユーザーが実行できます",
+ "info": "タスクは、「{permission}」許可または次の役割でユーザーが実行できます。",
"auto": "自動",
"auto-info": "すべての事前チェックに合格すると、自動的にリリースされ、変更が反映されます。",
"checkers": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index f4614fd3d3..fac74332c7 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1543,7 +1543,7 @@
"rollout": {
"name": "Chính sách triển khai",
"tip": "Chính sách được áp dụng cho các vấn đề hồi tố.",
- "info": "Các tác vụ có thể được thực hiện bởi người dùng có quyền 'taskRuns.Create' hoặc các vai trò sau",
+ "info": "Các tác vụ có thể được thực hiện bởi người dùng có quyền 'taskRuns.Create' hoặc các vai trò sau.",
"auto": "Triển khai tự động",
"auto-info": "Nếu tất cả kiểm tra vượt qua, thay đổi sẽ được triển khai và thực hiện tự động.",
"checkers": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 36781d7738..3e6163acc3 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1543,7 +1543,7 @@
"rollout": {
"name": "发布策略",
"tip": "新策略对旧工单也生效",
- "info": "拥有 “{permission}” 权限或以下角色的用户可以发布",
+ "info": "拥有 “{permission}” 权限或以下角色的用户可以发布。",
"auto": "自动发布",
"auto-info": "如果预检查都通过的话,会自动发布,执行变更。",
"checkers": {
diff --git a/frontend/src/views/SettingWorkspaceIM.vue b/frontend/src/views/SettingWorkspaceIM.vue
index a8cb26e907..6a9c364700 100644
--- a/frontend/src/views/SettingWorkspaceIM.vue
+++ b/frontend/src/views/SettingWorkspaceIM.vue
@@ -2,14 +2,9 @@
<div class="w-full space-y-4">
<div class="textinfolabel">
{{ $t("settings.im-integration.description") }}
- <a
- class="normal-link inline-flex items-center"
- href="https://docs.bytebase.com/change-database/webhook?source=console"
- target="__BLANK"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4 ml-1" />
- </a>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/change-database/webhook?source=console"
+ />
</div>
<NTabs v-model:value="state.selectedTab" type="line" animated>
<NTabPane v-for="item in imList" :key="item.type" :name="item.type">
@@ -56,6 +51,7 @@ import { computed, watch, reactive } from "vue";
import { useI18n } from "vue-i18n";
import { BBAttention } from "@/bbkit";
import BBTextField from "@/bbkit/BBTextField.vue";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import WebhookTypeIcon from "@/components/Project/WebhookTypeIcon.vue";
import { useSettingV1Store, pushNotification } from "@/store";
import { Webhook_Type } from "@/types/proto-es/v1/project_service_pb";
diff --git a/frontend/src/views/SettingWorkspaceRiskCenter.vue b/frontend/src/views/SettingWorkspaceRiskCenter.vue
index 49b3c3f2f7..a5c52b6f9b 100644
--- a/frontend/src/views/SettingWorkspaceRiskCenter.vue
+++ b/frontend/src/views/SettingWorkspaceRiskCenter.vue
@@ -7,14 +7,9 @@
<div class="w-full space-y-4 text-sm">
<div class="textinfolabel">
{{ $t("custom-approval.risk.description") }}
- <a
- href="https://docs.bytebase.com/administration/risk-center"
- 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>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/administration/risk-center?source=console"
+ />
</div>
<RiskCenter v-if="state.ready" />
<div v-else class="w-full py-[4rem] flex justify-center items-center">
@@ -41,6 +36,7 @@ import {
} from "@/components/CustomApproval/Settings/components/RiskCenter";
import { provideRiskFilter } from "@/components/CustomApproval/Settings/components/common";
import { FeatureAttention, FeatureModal } from "@/components/FeatureGuard";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { featureToRef, useRiskStore } from "@/store";
import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { hasWorkspacePermissionV2 } from "@/utils";
diff --git a/frontend/src/views/SettingWorkspaceSQLReview.vue b/frontend/src/views/SettingWorkspaceSQLReview.vue
index 1ea832946a..ff2bf31938 100644
--- a/frontend/src/views/SettingWorkspaceSQLReview.vue
+++ b/frontend/src/views/SettingWorkspaceSQLReview.vue
@@ -2,14 +2,9 @@
<div class="mx-auto space-y-4">
<div class="textinfolabel">
{{ $t("sql-review.description") }}
- <a
- href="https://docs.bytebase.com/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>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/sql-review/review-rules?source=console"
+ />
</div>
<div class="flex justify-end items-center gap-x-2">
@@ -57,6 +52,7 @@ import { NButton } from "naive-ui";
import { NEmpty } from "naive-ui";
import { watchEffect, ref, computed } from "vue";
import { useRouter } from "vue-router";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import SQLReviewPolicyTable from "@/components/SQLReview/components/SQLReviewPolicyTable.vue";
import { SearchBox } from "@/components/v2";
import { WORKSPACE_ROUTE_SQL_REVIEW_CREATE } from "@/router/dashboard/workspaceRoutes";
diff --git a/frontend/src/views/SettingWorkspaceSSO.vue b/frontend/src/views/SettingWorkspaceSSO.vue
index b4faffed15..f7d0764728 100644
--- a/frontend/src/views/SettingWorkspaceSSO.vue
+++ b/frontend/src/views/SettingWorkspaceSSO.vue
@@ -2,14 +2,9 @@
<div class="w-full space-y-4">
<div class="textinfolabel">
{{ $t("settings.sso.description") }}
- <a
- href="https://docs.bytebase.com/administration/sso/overview?source=console"
- class="normal-link inline-flex flex-row items-center"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/administration/sso/overview?source=console"
+ />
</div>
<div class="w-full flex flex-row justify-end items-center">
<NButton
@@ -57,6 +52,7 @@ import {
IdentityProviderTable,
IdentityProviderCreateWizard,
} from "@/components/IdentityProvider";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { WORKSPACE_ROUTE_IDENTITY_PROVIDER_DETAIL } from "@/router/dashboard/workspaceRoutes";
import { featureToRef, getIdentityProviderResourceId } from "@/store";
import { useIdentityProviderStore } from "@/store/modules/idp";
diff --git a/frontend/src/views/SettingWorkspaceSSODetail.vue b/frontend/src/views/SettingWorkspaceSSODetail.vue
index 978e16077f..bf4a1ee2ae 100644
--- a/frontend/src/views/SettingWorkspaceSSODetail.vue
+++ b/frontend/src/views/SettingWorkspaceSSODetail.vue
@@ -3,14 +3,9 @@
<div class="w-full flex flex-row justify-between items-center">
<div class="textinfolabel mr-4">
{{ $t("settings.sso.description") }}
- <a
- href="https://docs.bytebase.com/administration/sso/overview?source=console"
- class="normal-link inline-flex flex-row items-center"
- target="_blank"
- >
- {{ $t("common.learn-more") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
+ <LearnMoreLink
+ url="https://docs.bytebase.com/administration/sso/overview?source=console"
+ />
</div>
</div>
@@ -37,6 +32,7 @@ import { computed, reactive, ref, watchEffect } from "vue";
import { BBSpin } from "@/bbkit";
import { FeatureModal } from "@/components/FeatureGuard";
import { IdentityProviderEditForm } from "@/components/IdentityProvider";
+import LearnMoreLink from "@/components/LearnMoreLink.vue";
import { useIdentityProviderStore } from "@/store/modules/idp";
import { idpNamePrefix } from "@/store/modules/v1/common";
import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";