From e7a8ba2a503a6db094425a7da1d66298bca81908 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 18 May 2026 23:31:49 +0800 Subject: [PATCH] fix(desktop): keep driver tabs native --- .../components/config/DriverStoreDialog.vue | 27 +------------------ .../app-tests/driverStoreAppearance.test.ts | 6 ++++- 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/apps/desktop/src/components/config/DriverStoreDialog.vue b/apps/desktop/src/components/config/DriverStoreDialog.vue index 087965fbe..7ec03564e 100644 --- a/apps/desktop/src/components/config/DriverStoreDialog.vue +++ b/apps/desktop/src/components/config/DriverStoreDialog.vue @@ -442,7 +442,7 @@ onUnmounted(() => {
- + 内置驱动 JDBC 驱动 @@ -815,15 +815,6 @@ onUnmounted(() => { background: linear-gradient(180deg, oklch(0.985 0 0) 0%, oklch(0.965 0 0) 100%), var(--background); } -.driver-store-segmented { - height: 32px; - border: 0.5px solid oklch(0 0 0 / 0.1); - border-radius: 9px; - background: oklch(1 0 0 / 0.7); - padding: 2px; - box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.7); -} - .driver-store-panel, .driver-store-list { border: 0.5px solid oklch(0 0 0 / 0.11); @@ -905,26 +896,10 @@ onUnmounted(() => { background: oklch(1 0 0 / 0.72); } -:deep(.driver-store-segmented [data-state="active"]) { - border-radius: 7px; - background: oklch(1 0 0); - box-shadow: - 0 1px 3px oklch(0 0 0 / 0.12), - inset 0 0 0 0.5px oklch(0 0 0 / 0.08); -} - -:deep(.driver-store-segmented [role="tab"]) { - height: 26px; - min-width: 84px; - border-radius: 7px; - font-size: 12px; -} - .dark .driver-store-page { background: linear-gradient(180deg, oklch(0.18 0 0) 0%, oklch(0.145 0 0) 100%), var(--background); } -.dark .driver-store-segmented, .dark .driver-store-panel, .dark .driver-store-list { border-color: oklch(1 0 0 / 0.11); diff --git a/packages/app-tests/driverStoreAppearance.test.ts b/packages/app-tests/driverStoreAppearance.test.ts index 19dc0f4f5..c2e9f8816 100644 --- a/packages/app-tests/driverStoreAppearance.test.ts +++ b/packages/app-tests/driverStoreAppearance.test.ts @@ -7,7 +7,6 @@ const source = readFileSync("apps/desktop/src/components/config/DriverStoreDialo test("driver store uses a macOS-style grouped list presentation", () => { for (const className of [ "driver-store-page", - "driver-store-segmented", "driver-store-panel", "driver-store-list", "driver-store-row", @@ -16,3 +15,8 @@ test("driver store uses a macOS-style grouped list presentation", () => { assert.match(source, new RegExp(className)); } }); + +test("driver store keeps native tab styling", () => { + assert.doesNotMatch(source, /driver-store-segmented/); + assert.doesNotMatch(source, /:deep\(\.driver-store-segmented/); +});