mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac
This commit is contained in:
parent
8dac2a2140
commit
4e6d165d00
2 changed files with 32 additions and 20 deletions
|
|
@ -48,6 +48,10 @@
|
||||||
console.log(func);
|
console.log(func);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (window.opener ?? false) {
|
||||||
|
window.opener.postMessage('loaded', '*');
|
||||||
|
}
|
||||||
|
|
||||||
if (sessionStorage.function) {
|
if (sessionStorage.function) {
|
||||||
func = JSON.parse(sessionStorage.function);
|
func = JSON.parse(sessionStorage.function);
|
||||||
sessionStorage.removeItem('function');
|
sessionStorage.removeItem('function');
|
||||||
|
|
@ -61,6 +65,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if mounted}
|
{#if mounted}
|
||||||
|
{#key func?.content}
|
||||||
<FunctionEditor
|
<FunctionEditor
|
||||||
id={func?.id ?? ''}
|
id={func?.id ?? ''}
|
||||||
name={func?.name ?? ''}
|
name={func?.name ?? ''}
|
||||||
|
|
@ -71,4 +76,5 @@
|
||||||
saveHandler(e.detail);
|
saveHandler(e.detail);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,10 @@
|
||||||
console.log(tool);
|
console.log(tool);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (window.opener ?? false) {
|
||||||
|
window.opener.postMessage('loaded', '*');
|
||||||
|
}
|
||||||
|
|
||||||
if (sessionStorage.tool) {
|
if (sessionStorage.tool) {
|
||||||
tool = JSON.parse(sessionStorage.tool);
|
tool = JSON.parse(sessionStorage.tool);
|
||||||
sessionStorage.removeItem('tool');
|
sessionStorage.removeItem('tool');
|
||||||
|
|
@ -58,6 +62,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if mounted}
|
{#if mounted}
|
||||||
|
{#key tool?.content}
|
||||||
<ToolkitEditor
|
<ToolkitEditor
|
||||||
id={tool?.id ?? ''}
|
id={tool?.id ?? ''}
|
||||||
name={tool?.name ?? ''}
|
name={tool?.name ?? ''}
|
||||||
|
|
@ -68,4 +73,5 @@
|
||||||
saveHandler(e.detail);
|
saveHandler(e.detail);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue