Skip to content

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

chore: various SQL Editor Style tweak (#8061)

Tianzhou (天舟)3b628accbeae
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index e5bca8e6fe..e976cd7645 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2598,8 +2598,8 @@
"statement-copied": "Statement copied to clipboard",
"dont-show-again": "Don't show again",
"chat-sql": "ChatSQL",
- "disable-chat-sql": "Disable Chat SQL",
- "enable-chat-sql": "Enable Chat SQL"
+ "disable-chat-sql": "Disable ChatSQL",
+ "enable-chat-sql": "Enable ChatSQL"
}
},
"custom-approval": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 79aceb4225..bdac36150f 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2595,8 +2595,8 @@
"statement-copied": "Declaración copiada al portapapeles",
"dont-show-again": "No mostrar de nuevo",
"chat-sql": "ChatSQL",
- "disable-chat-sql": "Deshabilitar Chat SQL",
- "enable-chat-sql": "Habilitar Chat SQL"
+ "disable-chat-sql": "Deshabilitar ChatSQL",
+ "enable-chat-sql": "Habilitar ChatSQL"
}
},
"custom-approval": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 9c74f4939b..c727d63a5e 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2592,8 +2592,8 @@
"statement-copied": "语句已复制到剪贴板",
"dont-show-again": "不再显示",
"chat-sql": "ChatSQL",
- "disable-chat-sql": "关闭 Chat SQL",
- "enable-chat-sql": "开启 Chat SQL"
+ "disable-chat-sql": "关闭 ChatSQL",
+ "enable-chat-sql": "开启 ChatSQL"
}
},
"custom-approval": {
diff --git a/frontend/src/plugins/ai/components/ActionBar.vue b/frontend/src/plugins/ai/components/ActionBar.vue
index 12359e49f9..9d17f847b1 100644
--- a/frontend/src/plugins/ai/components/ActionBar.vue
+++ b/frontend/src/plugins/ai/components/ActionBar.vue
@@ -1,11 +1,11 @@
<template>
<div
- class="w-full flex flex-wrap gap-y-2 justify-between sm:items-center p-4 border-b bg-white"
+ class="w-full flex flex-wrap gap-y-2 justify-between sm:items-center px-4 py-2 border-b bg-white"
>
<div
class="action-left gap-x-2 flex overflow-x-auto sm:overflow-x-hidden items-center"
>
- <NButton @click="tab.editMode = 'SQL-EDITOR'">
+ <NButton size="small" @click="tab.editMode = 'SQL-EDITOR'">
<template #icon>
<heroicons:chevron-left />
</template>
@@ -16,7 +16,7 @@
<div
class="action-right gap-x-2 flex overflow-x-auto sm:overflow-x-hidden sm:justify-end items-center"
>
- <NButton @click="showHistoryDialog = true">
+ <NButton size="small" @click="showHistoryDialog = true">
<template #icon>
<heroicons:clock />
</template>
@@ -24,7 +24,7 @@
$t("plugin.ai.conversation.view-history-conversations")
}}</span>
</NButton>
- <NButton @click="events.emit('new-conversation')">
+ <NButton size="small" @click="events.emit('new-conversation')">
<template #icon>
<heroicons:plus />
</template>
diff --git a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
index 3a54b91109..528d5b9470 100644
--- a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
@@ -1,10 +1,10 @@
<template>
<div
v-if="connectionTreeStore.tree.state === ConnectionTreeState.LOADED"
- class="databases-tree p-0.5 gap-y-2 h-full flex flex-col"
+ class="databases-tree p-0.5 gap-y-1 h-full flex flex-col"
:class="connectionTreeStore.tree.mode"
>
- <div class="databases-tree--input">
+ <div class="databases-tree--input pt-1 px-2">
<NInput
size="small"
:value="searchPattern"
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
index 66bda88c37..2c41bb70d8 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/HistoryTabPane/HistoryTabPane.vue
@@ -1,9 +1,9 @@
<!-- eslint-disable vue/no-v-html -->
<template>
<div
- class="relative p-0.5 w-full h-full flex flex-col justify-start items-start"
+ class="relative py-0.5 w-full h-full flex flex-col justify-start items-start"
>
- <div class="w-full">
+ <div class="w-full px-2 pt-1.5">
<NInput
v-model:value="state.search"
size="small"
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
index f7db6365e6..524d380510 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/DatabaseSchema.vue
@@ -1,13 +1,13 @@
<template>
<div v-if="databaseMetadata" class="h-full overflow-hidden flex flex-col">
- <div class="flex items-center justify-between p-2 border-b gap-x-1">
+ <div class="flex items-center justify-between px-2 py-1 border-b gap-x-1">
<div
class="flex items-center flex-1 truncate"
:class="[headerClickable && 'cursor-pointer']"
@click="handleClickHeader"
>
<heroicons-outline:database class="h-4 w-4 mr-1 flex-shrink-0" />
- <span class="font-semibold">{{ databaseMetadata.name }}</span>
+ <span class="text-sm">{{ databaseMetadata.name }}</span>
</div>
<div class="flex justify-end gap-x-0.5">
<SchemaDiagramButton
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
index eef97f6c38..0cc430ec2f 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/SchemaPanel.vue
@@ -1,6 +1,6 @@
<template>
- <div class="flex flex-col h-full py-0.5">
- <div class="flex items-center gap-x-1 px-0.5">
+ <div class="flex flex-col h-full py-0.5 gap-y-1">
+ <div class="flex items-center gap-x-1 px-2 pt-1.5">
<NInput
v-model:value="keyword"
size="small"
@@ -26,7 +26,7 @@
<Transition name="slide-up" appear>
<TableSchema
v-if="state.selected"
- class="absolute bottom-0 w-full h-[calc(100%-41px)] bg-white"
+ class="absolute bottom-0 w-full h-[calc(100%-33px)] bg-white"
:database="database"
:database-metadata="databaseMetadata"
:schema="state.selected.schema"
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableSchema.vue b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableSchema.vue
index a308542f8d..53407a9a21 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableSchema.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/InfoTabPane/SchemaPanel/TableSchema.vue
@@ -1,13 +1,13 @@
<template>
<div class="overflow-hidden flex flex-col">
- <div class="flex items-center justify-between p-2 pl-4 border-b">
+ <div class="flex items-center justify-between pl-4 pr-2 py-1 border-b">
<div
class="flex items-center flex-1 truncate cursor-pointer"
@click="emit('close')"
>
<heroicons-outline:table class="h-4 w-4 mr-1 flex-shrink-0" />
- <span v-if="schema.name" class="font-semibold">{{ schema.name }}.</span>
- <span class="font-semibold">{{ table.name }}</span>
+ <span v-if="schema.name" class="text-sm">{{ schema.name }}.</span>
+ <span class="text-sm">{{ table.name }}</span>
</div>
<div
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
index fe1a51a57d..537f2f246c 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SecondaryGutterBar/SecondaryGutterBar.vue
@@ -1,26 +1,28 @@
<template>
- <div class="flex flex-col items-stretch justify-start text-sm gap-y-1">
- <div
- v-if="showInfoPane"
- class="gutter-bar--tab"
- :class="[activeTab === 'INFO' && 'gutter-bar--tab-active']"
- @click="handleClickTab('INFO')"
- >
- {{ $t("common.info") }}
- </div>
- <div
- class="gutter-bar--tab"
- :class="[activeTab === 'SHEET' && 'gutter-bar--tab-active']"
- @click="handleClickTab('SHEET')"
- >
- {{ $t("sheet.sheet") }}
- </div>
- <div
- class="gutter-bar--tab"
- :class="[activeTab === 'HISTORY' && 'gutter-bar--tab-active']"
- @click="handleClickTab('HISTORY')"
- >
- {{ $t("common.history") }}
+ <div class="flex flex-col items-stretch justify-start text-sm space-y-2">
+ <div class="divide-y border-b">
+ <div
+ v-if="showInfoPane"
+ class="gutter-bar--tab"
+ :class="[activeTab === 'INFO' && 'gutter-bar--tab-active']"
+ @click="handleClickTab('INFO')"
+ >
+ {{ $t("common.info") }}
+ </div>
+ <div
+ class="gutter-bar--tab"
+ :class="[activeTab === 'SHEET' && 'gutter-bar--tab-active']"
+ @click="handleClickTab('SHEET')"
+ >
+ {{ $t("sheet.sheet") }}
+ </div>
+ <div
+ class="gutter-bar--tab"
+ :class="[activeTab === 'HISTORY' && 'gutter-bar--tab-active']"
+ @click="handleClickTab('HISTORY')"
+ >
+ {{ $t("common.history") }}
+ </div>
</div>
<OpenAIButton class="self-center" />
@@ -113,12 +115,9 @@ watch(
<style lang="postcss" scoped>
.gutter-bar--tab {
- @apply writing-vertical-rl px-1 py-4 border-y bg-gray-50 cursor-pointer select-none;
-}
-.gutter-bar--tab:first-child {
- @apply border-t-0;
+ @apply writing-vertical-rl px-1 py-4 bg-white cursor-pointer select-none;
}
.gutter-bar--tab.gutter-bar--tab-active {
- @apply text-accent bg-white;
+ @apply bg-gray-100;
}
</style>
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
index e7cd89cefe..832a19f44d 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetList/SheetList.vue
@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col h-full py-1 gap-y-2">
- <div class="flex items-center gap-x-1">
+ <div class="flex items-center gap-x-1 px-1 pt-1">
<NInput
v-model:value="keyword"
size="small"
diff --git a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetTabPane.vue b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetTabPane.vue
index f7edd0638c..7a0db9e7e9 100644
--- a/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetTabPane.vue
+++ b/frontend/src/views/sql-editor/SecondarySidebar/SheetTabPane/SheetTabPane.vue
@@ -2,7 +2,7 @@
<NTabs
v-model:value="sheetTab"
size="small"
- class="h-full pt-1 px-1"
+ class="h-full pt-1.5 px-1"
pane-style="height: calc(100% - 29px); padding: 0;"
:tabs-padding="4"
>
diff --git a/frontend/src/views/sql-editor/TabList/TabList.vue b/frontend/src/views/sql-editor/TabList/TabList.vue
index 2101087b9b..b6d2086dc1 100644
--- a/frontend/src/views/sql-editor/TabList/TabList.vue
+++ b/frontend/src/views/sql-editor/TabList/TabList.vue
@@ -42,7 +42,7 @@
</button>
</div>
- <div class="hidden lg:block">
+ <div class="hidden lg:block -mt-0.5">
<ProfileDropdown v-if="showProfileDropdown" />
</div>