From 6a84d00b5eee3a85224f3676db9a6021f71a8dc3 Mon Sep 17 00:00:00 2001 From: Red Adaya Date: Wed, 23 Oct 2024 11:37:03 +0800 Subject: [PATCH] fix color preview --- frontend/app/view/background/background.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/view/background/background.tsx b/frontend/app/view/background/background.tsx index e085c4470..b8acea593 100644 --- a/frontend/app/view/background/background.tsx +++ b/frontend/app/view/background/background.tsx @@ -12,6 +12,7 @@ import "./background.less"; type BackgroundType = { label: string; + color: string; click: () => void; }; @@ -56,6 +57,7 @@ function Background({ model }: { model: BackgroundModel }) { } backgrounds.push({ label: preset["display:name"] ?? presetName, + color: preset["bg"] ?? "var(--main-bg-color)", click: () => { services.ObjectService.UpdateObjectMeta(oref, preset); }, @@ -69,7 +71,7 @@ function Background({ model }: { model: BackgroundModel }) { {backgrounds.map((bg, index) => { return (
bg.click()}> -
+
{bg.label}
);