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(query): remove result surface border

二丫讲梵75e984a6e89a
diff --git a/apps/desktop/src/components/layout/ContentArea.vue b/apps/desktop/src/components/layout/ContentArea.vue
index 0f8fcd37ce..ddb7757552 100644
--- a/apps/desktop/src/components/layout/ContentArea.vue
+++ b/apps/desktop/src/components/layout/ContentArea.vue
@@ -2152,7 +2152,7 @@ defineExpose({
</div>
</Pane>
<Pane v-if="(resultsPaneOpen || resultOnly) && !editorOnly" class="min-h-0" :size="resultOnly ? 100 : resultsPaneSize" :min-size="resultOnly ? 100 : 20">
- <div data-query-result-surface class="h-full flex flex-col border border-transparent" :style="activeResultColor ? { borderColor: activeResultColor } : undefined">
+ <div data-query-result-surface class="h-full flex flex-col">
<!--
The shared result surface (resultOnly) is always mounted regardless of
whether the active tab has run a query yet, and this toolbar is the only
diff --git a/apps/desktop/src/components/layout/__tests__/ContentArea.resultConnectionColors.spec.ts b/apps/desktop/src/components/layout/__tests__/ContentArea.resultConnectionColors.spec.ts
index 561dba19c8..ab3511a631 100644
--- a/apps/desktop/src/components/layout/__tests__/ContentArea.resultConnectionColors.spec.ts
+++ b/apps/desktop/src/components/layout/__tests__/ContentArea.resultConnectionColors.spec.ts
@@ -93,24 +93,26 @@ describe("query result connection colors", () => {
expect(tab.resultRuns?.[0]?.connectionId).toBe("test");
});
- it("colors each run from its source and keeps the selected result color after changing the editor connection", async () => {
- const { host, tab, connections } = await mountResults();
+ it.each(["tabs", "list"] as const)("keeps the selected source marker in %s mode when the editor connection changes", async (displayMode) => {
+ const { host, tab, connections, settings } = await mountResults();
const markers = [...host.querySelectorAll<HTMLElement>("[data-result-run-tab] [data-result-connection-color]")];
expect(markers.map((marker) => marker.style.backgroundColor)).toEqual(["#22c55e", "#ef4444"]);
- const surface = host.querySelector<HTMLElement>("[data-query-result-surface]")!;
- expect(surface.style.borderColor).toBe("#22c55e");
+ settings.editorSettings.resultRunDisplayMode = displayMode;
+ await nextTick();
+ const selectedMarker = () => host.querySelector<HTMLElement>(displayMode === "tabs" ? '[data-result-run-tab][aria-selected="true"] [data-result-connection-color]' : "[data-query-result-surface] [data-result-connection-color]");
+ expect(selectedMarker()?.style.backgroundColor).toBe("#22c55e");
tab.connectionId = "production";
await nextTick();
- expect(surface.style.borderColor).toBe("#22c55e");
+ expect(selectedMarker()?.style.backgroundColor).toBe("#22c55e");
tab.activeResultRunId = "production-run";
await nextTick();
- expect(surface.style.borderColor).toBe("#ef4444");
+ expect(selectedMarker()?.style.backgroundColor).toBe("#ef4444");
connections.connections[1]!.color = "#3b82f6";
await nextTick();
- expect(surface.style.borderColor).toBe("#3b82f6");
+ expect(selectedMarker()?.style.backgroundColor).toBe("#3b82f6");
connections.connections[1]!.color = "";
await nextTick();
- expect(surface.style.borderColor).toBe("");
+ expect(selectedMarker()).toBeNull();
});
it("colors ordinary result sets without retained runs and removes markers for an uncolored connection", async () => {