From 3ebd31f7929f7d5fd37942f41aafabf448a15735 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Mon, 18 May 2026 23:49:45 +0800 Subject: [PATCH] style(desktop): restore driver store appearance --- .../components/config/DriverStoreDialog.vue | 238 +++++------------- .../app-tests/driverStoreAppearance.test.ts | 21 +- 2 files changed, 71 insertions(+), 188 deletions(-) diff --git a/apps/desktop/src/components/config/DriverStoreDialog.vue b/apps/desktop/src/components/config/DriverStoreDialog.vue index 7ec03564e..65d74177d 100644 --- a/apps/desktop/src/components/config/DriverStoreDialog.vue +++ b/apps/desktop/src/components/config/DriverStoreDialog.vue @@ -437,9 +437,9 @@ onUnmounted(() => { - - diff --git a/packages/app-tests/driverStoreAppearance.test.ts b/packages/app-tests/driverStoreAppearance.test.ts index c2e9f8816..7d8928be6 100644 --- a/packages/app-tests/driverStoreAppearance.test.ts +++ b/packages/app-tests/driverStoreAppearance.test.ts @@ -4,19 +4,26 @@ import test from "node:test"; const source = readFileSync("apps/desktop/src/components/config/DriverStoreDialog.vue", "utf8"); -test("driver store uses a macOS-style grouped list presentation", () => { +test("driver store keeps the v0.5.12 grouped-list appearance", () => { + assert.match(source, /max-w-4xl mx-auto px-6 py-6/); + assert.match(source, /rounded-xl border bg-muted\/20 p-4/); + assert.match(source, /rounded-md border divide-y/); + assert.match(source, /flex items-center gap-3 px-4 py-2\.5 transition hover:bg-muted\/30/); +}); + +test("driver store only keeps oval button styling from the later appearance pass", () => { + assert.match(source, /rounded-full/); for (const className of [ "driver-store-page", "driver-store-panel", "driver-store-list", "driver-store-row", + "driver-store-icon", + "driver-store-badge", "driver-store-action-primary", + "driver-store-action-secondary", ]) { - assert.match(source, new RegExp(className)); + assert.doesNotMatch(source, new RegExp(className)); } -}); - -test("driver store keeps native tab styling", () => { - assert.doesNotMatch(source, /driver-store-segmented/); - assert.doesNotMatch(source, /:deep\(\.driver-store-segmented/); + assert.doesNotMatch(source, /