Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
a82154de
"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "4c22d130d96d7488b7619d9a140f4fa72c3c8f4d"
Commit
a82154de
authored
Jun 23, 2024
by
Timothy J. Baek
Browse files
refac
parent
f33ca4c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/lib/components/chat/Chat.svelte
src/lib/components/chat/Chat.svelte
+7
-2
No files found.
src/lib/components/chat/Chat.svelte
View file @
a82154de
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
}
}
onMount(async () => {
onMount(async () => {
window.addEventListener('message',
async (event) => {
const onMessageHandler =
async (event) => {
if (event.origin === window.origin) {
if (event.origin === window.origin) {
// Replace with your iframe's origin
// Replace with your iframe's origin
console.log('Message received from iframe:', event.data);
console.log('Message received from iframe:', event.data);
...
@@ -160,7 +160,8 @@
...
@@ -160,7 +160,8 @@
}
}
}
}
}
}
});
};
window.addEventListener('message', onMessageHandler);
if (!$chatId) {
if (!$chatId) {
chatId.subscribe(async (value) => {
chatId.subscribe(async (value) => {
...
@@ -173,6 +174,10 @@
...
@@ -173,6 +174,10 @@
await goto('/');
await goto('/');
}
}
}
}
return () => {
window.removeEventListener('message', onMessageHandler);
};
});
});
//////////////////////////
//////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment