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
1c7dd7b8
Commit
1c7dd7b8
authored
Jun 01, 2024
by
Timothy J. Baek
Browse files
refac: openwebui.com integration
parent
32a8884c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
41 deletions
+6
-41
src/routes/(app)/workspace/models/create/+page.svelte
src/routes/(app)/workspace/models/create/+page.svelte
+3
-7
src/routes/(app)/workspace/prompts/create/+page.svelte
src/routes/(app)/workspace/prompts/create/+page.svelte
+3
-7
src/routes/prompts/create/+page.svelte
src/routes/prompts/create/+page.svelte
+0
-27
No files found.
src/routes/(app)/workspace/models/create/+page.svelte
View file @
1c7dd7b8
...
@@ -138,13 +138,9 @@
...
@@ -138,13 +138,9 @@
onMount(async () => {
onMount(async () => {
window.addEventListener('message', async (event) => {
window.addEventListener('message', async (event) => {
if (
if (
![
!['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:5173'].includes(
'https://ollamahub.com',
event.origin
'https://www.ollamahub.com',
)
'https://openwebui.com',
'https://www.openwebui.com',
'http://localhost:5173'
].includes(event.origin)
)
)
return;
return;
...
...
src/routes/(app)/workspace/prompts/create/+page.svelte
View file @
1c7dd7b8
...
@@ -57,13 +57,9 @@
...
@@ -57,13 +57,9 @@
onMount(async () => {
onMount(async () => {
window.addEventListener('message', async (event) => {
window.addEventListener('message', async (event) => {
if (
if (
![
!['https://openwebui.com', 'https://www.openwebui.com', 'http://localhost:5173'].includes(
'https://ollamahub.com',
event.origin
'https://www.ollamahub.com',
)
'https://openwebui.com',
'https://www.openwebui.com',
'http://localhost:5173'
].includes(event.origin)
)
)
return;
return;
const prompt = JSON.parse(event.data);
const prompt = JSON.parse(event.data);
...
...
src/routes/prompts/create/+page.svelte
deleted
100644 → 0
View file @
32a8884c
<script lang="ts">
import { goto } from '$app/navigation';
import { onMount } from 'svelte';
onMount(async () => {
window.addEventListener('message', async (event) => {
if (
![
'https://ollamahub.com',
'https://www.ollamahub.com',
'https://openwebui.com',
'https://www.openwebui.com',
'http://localhost:5173'
].includes(event.origin)
)
return;
const prompts = JSON.parse(event.data);
sessionStorage.modelfile = JSON.stringify(prompts);
goto('/workspace/prompts/create');
});
if (window.opener ?? false) {
window.opener.postMessage('loaded', '*');
}
});
</script>
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