Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
style(sql-editor): improve the save dot style (#429)
Yunwei Xiao9ffe5e1008ef
diff --git a/frontend/src/locales/en.yml b/frontend/src/locales/en.ymlindex 343f899231..338234ed62 100644--- a/frontend/src/locales/en.yml+++ b/frontend/src/locales/en.yml@@ -1071,7 +1071,7 @@ setting:value-placeholder: Label value...sql-editor:self: SQL Editor- select-connection: Select Connections+ select-connection: Please select connectionssearch-databases: Search Databasessearch-results: Search Resultsloading-databases: Loading Databases...@@ -1105,6 +1105,7 @@ sql-editor:copy-code: Copy codenotify:copy-code-succeed: Copy code succeed+ view-all-tabs: View all Tabslabel:empty-label-value: <Empty Value>no-label: No labelsdiff --git a/frontend/src/locales/zh-CN.yml b/frontend/src/locales/zh-CN.ymlindex 0692703670..e3723341c0 100644--- a/frontend/src/locales/zh-CN.yml+++ b/frontend/src/locales/zh-CN.yml@@ -973,6 +973,7 @@ sql-editor:copy-code: 复制代码notify:copy-code-succeed: 代码复制成功+ view-all-tabs: 查看所有标签页label:empty-label-value: <空值>no-label: 没有标签diff --git a/frontend/src/views/SqlEditor/QuerySelector.vue b/frontend/src/views/SqlEditor/QuerySelector.vueindex f21d60c9c0..42884d0824 100644--- a/frontend/src/views/SqlEditor/QuerySelector.vue+++ b/frontend/src/views/SqlEditor/QuerySelector.vue@@ -24,7 +24,7 @@<carbon:code class="h-4 w-4" /></span><div- class="label max-w-5xl w-48 overflow-hidden whitespace-nowrap overflow-ellipsis"+ class="label max-w-5xl w-48 truncate"@dblclick="handleEditLabel(tab)"><div@@ -40,10 +40,10 @@class="rounded px-2 py-0 text-sm w-full absolute left-0 bottom-0"@blur="(e: Event) => handleTryChangeLabel()"@keyup.enter="(e: Event) => handleTryChangeLabel()"- @keyup.esc="handleCancelInput"+ @keyup.esc="handleCancelChangeLabel"/><!-- this is a trick -->- <span class="w-full h-full invisible line-camp-1">+ <span class="w-full h-full invisible">Edit {{ labelState.currentLabelName }}</span></div>@@ -61,11 +61,13 @@</template><template v-else><template v-if="!tab.isSaved">- <span class="editing text-gray-400">+ <span class="suffix editing text-gray-400"><carbon:dot-mark class="h-4 w-4" /></span></template>- <template v-if="tab.id === activeTabId && queryTabList.length > 1">+ <template+ v-else-if="tab.id === activeTabId && queryTabList.length > 1"+ ><spanclass="suffix close hover:bg-gray-200 rounded-sm"@click.prevent="handleRemoveTab(tab)"@@ -104,7 +106,7 @@<heroicons-solid:chevron-down class="h-4 w-4" /></button></template>- View all Tabs+ {{ $t("sql-editor.view-all-tabs") }}</NTooltip></NPopselect></div>@@ -166,6 +168,7 @@ const labelState = reactive({editingTabId: "",});const labelInputRef = ref<HTMLInputElement>();+const tabList = computed(() => {return queryTabList.value.map((tab: TabInfo) => {return {@@ -224,7 +227,7 @@ const handleTryChangeLabel = () => {});}};-const handleCancelInput = () => {+const handleCancelChangeLabel = () => {labelState.currentLabelName = labelState.oldLabelName;updateActiveTab({label: labelState.currentLabelName,