mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
26 lines
583 B
Svelte
26 lines
583 B
Svelte
<script>
|
|
import { theme } from '$lib/stores';
|
|
import { Background, Controls, SvelteFlow, BackgroundVariant } from '@xyflow/svelte';
|
|
|
|
export let nodes;
|
|
export let nodeTypes;
|
|
export let edges;
|
|
</script>
|
|
|
|
<SvelteFlow
|
|
{nodes}
|
|
{nodeTypes}
|
|
{edges}
|
|
fitView
|
|
minZoom={0.001}
|
|
colorMode={$theme.includes('dark') ? 'dark' : 'light'}
|
|
nodesDraggable={false}
|
|
on:nodeclick={(event) => console.log('on node click', event.detail.node)}
|
|
oninit={() => {
|
|
console.log('Flow initialized');
|
|
}}
|
|
>
|
|
<Controls showLock={false} />
|
|
<Background variant={BackgroundVariant.Dots} />
|
|
</SvelteFlow>
|