mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix
This commit is contained in:
parent
e723b2a4c6
commit
1743d3c6c1
@ -86,7 +86,10 @@
|
|||||||
<div class=" {$showOverview ? ' h-screen w-screen' : 'px-6 py-4'} h-full">
|
<div class=" {$showOverview ? ' h-screen w-screen' : 'px-6 py-4'} h-full">
|
||||||
{#if $showOverview}
|
{#if $showOverview}
|
||||||
<Overview
|
<Overview
|
||||||
bind:history
|
{history}
|
||||||
|
on:nodeclick={(e) => {
|
||||||
|
showMessage(e.detail.node.data.message);
|
||||||
|
}}
|
||||||
on:close={() => {
|
on:close={() => {
|
||||||
showControls.set(false);
|
showControls.set(false);
|
||||||
}}
|
}}
|
||||||
@ -126,7 +129,7 @@
|
|||||||
/>
|
/>
|
||||||
{:else if $showOverview}
|
{:else if $showOverview}
|
||||||
<Overview
|
<Overview
|
||||||
bind:history
|
{history}
|
||||||
on:nodeclick={(e) => {
|
on:nodeclick={(e) => {
|
||||||
showMessage(e.detail.node.data.message);
|
showMessage(e.detail.node.data.message);
|
||||||
}}
|
}}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getContext, createEventDispatcher } from 'svelte';
|
import { getContext, createEventDispatcher, onDestroy } from 'svelte';
|
||||||
import { useSvelteFlow, useNodesInitialized, useStore } from '@xyflow/svelte';
|
import { useSvelteFlow, useNodesInitialized, useStore } from '@xyflow/svelte';
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
@ -111,6 +111,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
drawFlow();
|
||||||
|
|
||||||
nodesInitialized.subscribe(async (initialized) => {
|
nodesInitialized.subscribe(async (initialized) => {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
await tick();
|
await tick();
|
||||||
@ -130,6 +132,13 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onDestroy(() => {
|
||||||
|
console.log('Overview destroyed');
|
||||||
|
|
||||||
|
nodes.set([]);
|
||||||
|
edges.set([]);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="w-full h-full relative">
|
<div class="w-full h-full relative">
|
||||||
|
Loading…
Reference in New Issue
Block a user