Skip to content

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

chore: add docs link (#4904)

Liu Ji9ca785a777f8
diff --git a/frontend/src/assets/css/tailwind.css b/frontend/src/assets/css/tailwind.css
index a2a0e140f7..eefd33ff46 100644
--- a/frontend/src/assets/css/tailwind.css
+++ b/frontend/src/assets/css/tailwind.css
@@ -220,6 +220,10 @@
@apply cursor-pointer text-blue-600 hover:underline hover:text-blue-800 focus:outline-none;
}
+.light-link {
+ @apply cursor-pointer text-blue-400 hover:underline hover:text-blue-200 focus:outline-none;
+}
+
.icon-link {
@apply cursor-pointer text-control hover:bg-link-hover focus:outline-none;
}
diff --git a/frontend/src/components/Issue/rollback/TaskRollbackView.vue b/frontend/src/components/Issue/rollback/TaskRollbackView.vue
index 7ec3729eb9..32ca385b04 100644
--- a/frontend/src/components/Issue/rollback/TaskRollbackView.vue
+++ b/frontend/src/components/Issue/rollback/TaskRollbackView.vue
@@ -6,9 +6,18 @@
<template #trigger>
<heroicons-outline:question-mark-circle class="h-4 w-4" />
</template>
- <div class="whitespace-pre-line">
- {{ $t("task.rollback.sql-rollback-tips") }}
- </div>
+ <i18n-t
+ tag="div"
+ keypath="task.rollback.sql-rollback-tips"
+ class="whitespace-pre-line"
+ >
+ <template #link>
+ <LearnMoreLink
+ url="https://www.bytebase.com/docs/change-database/rollback-data-changes?source=console"
+ color="light"
+ />
+ </template>
+ </i18n-t>
</NTooltip>
</h2>
diff --git a/frontend/src/components/LearnMoreLink.vue b/frontend/src/components/LearnMoreLink.vue
index 5ac98b8c93..3ebf6d8ff7 100644
--- a/frontend/src/components/LearnMoreLink.vue
+++ b/frontend/src/components/LearnMoreLink.vue
@@ -1,15 +1,26 @@
<template>
- <a class="normal-link inline-flex items-center" :href="url" target="__BLANK">
+ <a
+ class="inline-flex items-center"
+ :class="[color === 'normal' ? 'normal-link' : 'light-link']"
+ :href="url"
+ target="__BLANK"
+ >
{{ $t("common.learn-more") }}
<heroicons-outline:external-link class="w-4 h-4 ml-1" />
</a>
</template>
<script lang="ts" setup>
+import { PropType } from "vue";
+
defineProps({
url: {
type: String,
required: true,
},
+ color: {
+ type: String as PropType<"normal" | "light">,
+ default: "normal",
+ },
});
</script>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index d06c27a164..5a9aee4b4c 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -310,7 +310,7 @@
"generating": "Generating",
"empty-rollback-statement": "The rollback statement is empty",
"cancel-generating": "Cancel generating the SQL rollback",
- "sql-rollback-tips": "When enabled, Bytebase will keep the rollback logs for the data change\nand allow you to create a new issue to revert this change."
+ "sql-rollback-tips": "When enabled, Bytebase will keep the rollback logs for the data change\nand allow you to create a new issue to revert this change. {link}"
}
},
"banner": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 69bd26f625..ff048a2949 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -308,7 +308,7 @@
"generating": "生成中",
"empty-rollback-statement": "回滚语句为空",
"cancel-generating": "取消生成回滚语句",
- "sql-rollback-tips": "开启时,Bytebase 会保留数据变更的回滚日志,\n可以用于创建一个新的工单来回滚这次变更。"
+ "sql-rollback-tips": "开启时,Bytebase 会保留数据变更的回滚日志,\n可以用于创建一个新的工单来回滚这次变更。{link}"
}
},
"banner": {