mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-07 09:58:34 +00:00
style(webui): retain model preset colors
This commit is contained in:
parent
c8bc4d8510
commit
6f2512ce9a
@ -3453,7 +3453,7 @@ function ModelsSettings({
|
|||||||
key={key}
|
key={key}
|
||||||
id="model-preset-editor"
|
id="model-preset-editor"
|
||||||
data-testid="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 ? (
|
{creating ? (
|
||||||
<div className="flex min-h-[52px] items-center px-4 py-3 sm:px-5">
|
<div className="flex min-h-[52px] items-center px-4 py-3 sm:px-5">
|
||||||
@ -3580,12 +3580,7 @@ function ModelsSettings({
|
|||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className={cn(
|
className="self-start rounded-full text-muted-foreground hover:text-destructive"
|
||||||
"self-start rounded-full",
|
|
||||||
selectedPresetOnlyActive
|
|
||||||
? "text-muted-foreground"
|
|
||||||
: "text-destructive hover:bg-destructive/10 hover:text-destructive",
|
|
||||||
)}
|
|
||||||
disabled={selectedPresetOnlyActive || saving || orderSaving}
|
disabled={selectedPresetOnlyActive || saving || orderSaving}
|
||||||
title={
|
title={
|
||||||
selectedPresetOnlyActive
|
selectedPresetOnlyActive
|
||||||
|
|||||||
@ -2167,7 +2167,7 @@ describe("SettingsView Apps catalog", () => {
|
|||||||
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
||||||
expect(trigger).toHaveAttribute("aria-controls", "model-preset-editor");
|
expect(trigger).toHaveAttribute("aria-controls", "model-preset-editor");
|
||||||
expect(row.nextElementSibling).toBe(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).getByDisplayValue("Primary")).toBeInTheDocument();
|
||||||
expect(within(editor).getByRole("button", { name: "Delete" })).toBeDisabled();
|
expect(within(editor).getByRole("button", { name: "Delete" })).toBeDisabled();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user