feat: import/export community
This commit is contained in:
@@ -36,6 +36,18 @@
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('message', async (event) => {
|
||||
if (
|
||||
!['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:9999'].includes(
|
||||
event.origin
|
||||
)
|
||||
)
|
||||
return;
|
||||
|
||||
func = JSON.parse(event.data);
|
||||
console.log(func);
|
||||
});
|
||||
|
||||
if (sessionStorage.function) {
|
||||
func = JSON.parse(sessionStorage.function);
|
||||
sessionStorage.removeItem('function');
|
||||
|
||||
@@ -33,6 +33,18 @@
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener('message', async (event) => {
|
||||
if (
|
||||
!['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:9999'].includes(
|
||||
event.origin
|
||||
)
|
||||
)
|
||||
return;
|
||||
|
||||
tool = JSON.parse(event.data);
|
||||
console.log(tool);
|
||||
});
|
||||
|
||||
if (sessionStorage.tool) {
|
||||
tool = JSON.parse(sessionStorage.tool);
|
||||
sessionStorage.removeItem('tool');
|
||||
|
||||
Reference in New Issue
Block a user