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
ff9b94ba
Commit
ff9b94ba
authored
Jun 18, 2024
by
Timothy J. Baek
Browse files
refac: playground
parent
d1eb2c22
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
12 deletions
+41
-12
src/lib/components/layout/Sidebar/UserMenu.svelte
src/lib/components/layout/Sidebar/UserMenu.svelte
+26
-0
src/routes/(app)/playground/+page.svelte
src/routes/(app)/playground/+page.svelte
+15
-0
src/routes/(app)/workspace/+layout.svelte
src/routes/(app)/workspace/+layout.svelte
+0
-7
src/routes/(app)/workspace/playground/+page.svelte
src/routes/(app)/workspace/playground/+page.svelte
+0
-5
No files found.
src/lib/components/layout/Sidebar/UserMenu.svelte
View file @
ff9b94ba
...
...
@@ -81,6 +81,32 @@
</button>
{#if role === 'admin'}
<button
class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
on:click={() => {
goto('/playground');
show = false;
}}
>
<div class=" self-center mr-3">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-5"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M14.25 9.75 16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z"
/>
</svg>
</div>
<div class=" self-center font-medium">{$i18n.t('Playground')}</div>
</button>
<button
class="flex rounded-md py-2 px-3 w-full hover:bg-gray-50 dark:hover:bg-gray-800 transition"
on:click={() => {
...
...
src/routes/(app)/playground/+page.svelte
0 → 100644
View file @
ff9b94ba
<script>
import { showSidebar } from '$lib/stores';
import Playground from '$lib/components/workspace/Playground.svelte';
</script>
<div
class=" flex flex-col w-full min-h-screen max-h-screen {$showSidebar
? 'md:max-w-[calc(100%-260px)]'
: ''}"
>
<div class=" py-4 px-5 flex-1 max-h-full overflow-y-auto">
<Playground />
</div>
</div>
src/routes/(app)/workspace/+layout.svelte
View file @
ff9b94ba
...
...
@@ -82,13 +82,6 @@
>
{$i18n.t('Functions')}
</a>
<a
class="min-w-fit rounded-lg p-1.5 px-3 {$page.url.pathname.includes('/workspace/playground')
? 'bg-gray-50 dark:bg-gray-850'
: ''} transition"
href="/workspace/playground">{$i18n.t('Playground')}</a
>
</div>
</div>
...
...
src/routes/(app)/workspace/playground/+page.svelte
deleted
100644 → 0
View file @
d1eb2c22
<script>
import Playground from '$lib/components/workspace/Playground.svelte';
</script>
<Playground />
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