Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(schema-diff): highlight deploy script selections

Melody Ruche0bf2ca717a7
diff --git a/apps/desktop/src/components/diff/SchemaDiffDeployStep.vue b/apps/desktop/src/components/diff/SchemaDiffDeployStep.vue
index 98a263bcc4..69cdd7635c 100644
--- a/apps/desktop/src/components/diff/SchemaDiffDeployStep.vue
+++ b/apps/desktop/src/components/diff/SchemaDiffDeployStep.vue
@@ -349,7 +349,7 @@ function getObjectIconColor(kind: DiffObjectKind): string {
</Pane>
<Pane size="70" min-size="40">
- <div ref="editorContainer" class="h-full w-full" />
+ <div ref="editorContainer" class="deploy-sql-editor h-full w-full" />
</Pane>
</Splitpanes>
@@ -389,6 +389,19 @@ function getObjectIconColor(kind: DiffObjectKind): string {
</template>
<style scoped>
+/* CodeMirror's own selection layer isn't styled here, so selecting text in the deploy
+ script preview renders with no visible highlight at all in some environments. Match
+ the override already used by the other read-only CodeMirror views (DdlViewDialog,
+ NacosAdminConsole). */
+.deploy-sql-editor :deep(.cm-selectionBackground),
+.deploy-sql-editor :deep(.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground) {
+ background: var(--dbx-editor-selection-background, rgba(59, 130, 246, 0.35)) !important;
+}
+
+.deploy-sql-editor :deep(.cm-content ::selection) {
+ background: var(--dbx-editor-selection-background, rgba(59, 130, 246, 0.35)) !important;
+}
+
:deep(.splitpanes--vertical > .splitpanes__splitter) {
width: 4px;
background: var(--border);