Skip to content

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

chore: tooltips and wordings (#9598)

Liu Jif0e7e50cd802
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 658eb86d5c..5e26303009 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2229,7 +2229,9 @@
"description": "Batch query {count} additional databases under {project}."
},
"executing-query": "Executing query",
- "grouping": "Grouping"
+ "grouping": "Grouping",
+ "previous-row": "Previous row",
+ "next-row": "Next row"
},
"schema-editor": {
"self": "Schema Editor",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 9bc921b5ff..0419e37bdd 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2225,7 +2225,9 @@
"description": "Consulta por lotes {count} bases de datos adicionales en {project}."
},
"executing-query": "Ejecutando consulta",
- "grouping": "Agrupamiento"
+ "grouping": "Agrupamiento",
+ "previous-row": "Fila anterior",
+ "next-row": "siguiente fila"
},
"schema-editor": {
"self": "Editor de esquema",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 1e44318c74..cf2af49055 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2224,7 +2224,9 @@
"description": "批量查询 {project} 下的 {count} 个数据库。"
},
"executing-query": "执行查询",
- "grouping": "分组"
+ "grouping": "分组",
+ "previous-row": "上一行",
+ "next-row": "下一行"
},
"schema-editor": {
"self": "Schema 编辑器",
diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
index 4b95cf3c91..d632d73d89 100644
--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/DetailPanel.vue
@@ -9,24 +9,49 @@
>
<div class="flex items-center justify-between gap-x-4">
<div class="flex items-center gap-x-2">
- <NButton size="tiny" :disabled="detail.row === 0" @click="move(-1)">
- <template #icon>
- <heroicons:chevron-up />
+ <NTooltip :delay="500">
+ <template #trigger>
+ <NButton
+ size="tiny"
+ tag="div"
+ :disabled="detail.row === 0"
+ @click="move(-1)"
+ >
+ <template #icon>
+ <ChevronUpIcon class="w-4 h-4" />
+ </template>
+ </NButton>
</template>
- </NButton>
- <NButton
- size="tiny"
- :disabled="detail.row === totalCount - 1"
- @click="move(1)"
- >
- <template #icon>
- <heroicons:chevron-down />
+ <template #default>
+ <div class="whitespace-nowrap">
+ {{ $t("sql-editor.previous-row") }}
+ </div>
</template>
- </NButton>
+ </NTooltip>
+ <NTooltip :delay="500">
+ <template #trigger>
+ <NButton
+ size="tiny"
+ tag="div"
+ :disabled="detail.row === totalCount - 1"
+ @click="move(1)"
+ >
+ <template #icon>
+ <ChevronDownIcon class="w-4 h-4" />
+ </template>
+ </NButton>
+ </template>
+ <template #default>
+ <div class="whitespace-nowrap">
+ {{ $t("sql-editor.next-row") }}
+ </div>
+ </template>
+ </NTooltip>
<div class="text-xs text-control-light flex items-center gap-x-1">
<span>{{ detail.row + 1 }}</span>
<span>/</span>
<span>{{ totalCount }}</span>
+ <span>{{ $t("sql-editor.rows", totalCount) }}</span>
</div>
</div>
@@ -54,7 +79,8 @@
<script setup lang="ts">
import { onKeyStroke, useClipboard } from "@vueuse/core";
import { escape, get } from "lodash-es";
-import { NButton } from "naive-ui";
+import { ChevronDownIcon, ChevronUpIcon } from "lucide-vue-next";
+import { NButton, NTooltip } from "naive-ui";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { DrawerContent } from "@/components/v2";