Feat: Modify the background color of the canvas #9869 (#10507)

### What problem does this PR solve?

Feat: Modify the background color of the canvas #9869

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-10-13 11:10:54 +08:00
committed by GitHub
parent 58836d84fe
commit acca3640f7
4 changed files with 7 additions and 9 deletions

View File

@ -1,13 +1,11 @@
import { useIsDarkTheme } from '@/components/theme-provider';
import { Background } from '@xyflow/react'; import { Background } from '@xyflow/react';
export function AgentBackground() { export function AgentBackground() {
const isDarkTheme = useIsDarkTheme();
return ( return (
<Background <Background
color={isDarkTheme ? 'rgba(255,255,255,0.15)' : '#A8A9B3'} color="var(--text-primary)"
bgColor={isDarkTheme ? 'rgba(11, 11, 12, 1)' : 'rgba(0, 0, 0, 0.05)'} bgColor="rgb(var(--bg-canvas))"
className="rounded-lg"
/> />
); );
} }

View File

@ -232,7 +232,7 @@ function AgentCanvas({ drawerVisible, hideDrawer }: IProps) {
]); ]);
return ( return (
<div className={styles.canvasWrapper}> <div className={cn(styles.canvasWrapper, 'px-5 pb-5')}>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
style={{ position: 'absolute', top: 10, left: 0 }} style={{ position: 'absolute', top: 10, left: 0 }}

View File

@ -47,13 +47,13 @@ function NoteNode({ data, id, selected }: NodeProps<INoteNode>) {
return ( return (
<NodeWrapper <NodeWrapper
className="p-0 w-full h-full flex flex-col" className="p-0 w-full h-full flex flex-col bg-bg-component"
selected={selected} selected={selected}
> >
<NodeResizeControl minWidth={190} minHeight={128} style={controlStyle}> <NodeResizeControl minWidth={190} minHeight={128} style={controlStyle}>
<ResizeIcon /> <ResizeIcon />
</NodeResizeControl> </NodeResizeControl>
<section className="p-2 flex gap-2 bg-background-note items-center note-drag-handle rounded-t"> <section className="p-2 flex gap-2 items-center note-drag-handle rounded-t">
<NotebookPen className="size-4" /> <NotebookPen className="size-4" />
<Form {...nameForm}> <Form {...nameForm}>
<form className="flex-1"> <form className="flex-1">

View File

@ -205,7 +205,7 @@ function DataFlowCanvas({ drawerVisible, hideDrawer, showLogSheet }: IProps) {
}; };
return ( return (
<div className={styles.canvasWrapper}> <div className={cn(styles.canvasWrapper, 'px-5 pb-5')}>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
style={{ position: 'absolute', top: 10, left: 0 }} style={{ position: 'absolute', top: 10, left: 0 }}