style(webui): retain model preset colors

This commit is contained in:
Xubin Ren 2026-08-07 11:05:49 +08:00
parent c8bc4d8510
commit 6f2512ce9a
2 changed files with 3 additions and 8 deletions

View File

@ -3453,7 +3453,7 @@ function ModelsSettings({
key={key}
id="model-preset-editor"
data-testid="model-preset-editor"
className="divide-y divide-border/45 bg-muted/30 motion-reduce:animate-none animate-in fade-in-0 slide-in-from-top-1 duration-200"
className="divide-y divide-border/45 bg-muted/10 motion-reduce:animate-none animate-in fade-in-0 slide-in-from-top-1 duration-200"
>
{creating ? (
<div className="flex min-h-[52px] items-center px-4 py-3 sm:px-5">
@ -3580,12 +3580,7 @@ function ModelsSettings({
<Button
size="sm"
variant="ghost"
className={cn(
"self-start rounded-full",
selectedPresetOnlyActive
? "text-muted-foreground"
: "text-destructive hover:bg-destructive/10 hover:text-destructive",
)}
className="self-start rounded-full text-muted-foreground hover:text-destructive"
disabled={selectedPresetOnlyActive || saving || orderSaving}
title={
selectedPresetOnlyActive

View File

@ -2167,7 +2167,7 @@ describe("SettingsView Apps catalog", () => {
expect(trigger).toHaveAttribute("aria-expanded", "true");
expect(trigger).toHaveAttribute("aria-controls", "model-preset-editor");
expect(row.nextElementSibling).toBe(editor);
expect(editor).toHaveClass("slide-in-from-top-1", "bg-muted/30");
expect(editor).toHaveClass("slide-in-from-top-1", "bg-muted/10");
expect(within(editor).getByDisplayValue("Primary")).toBeInTheDocument();
expect(within(editor).getByRole("button", { name: "Delete" })).toBeDisabled();