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
465c3a99
Commit
465c3a99
authored
Jun 24, 2024
by
Timothy J. Baek
Browse files
refac: playground styling
parent
4c9fa6cf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
11 deletions
+48
-11
src/routes/(app)/playground/+layout.svelte
src/routes/(app)/playground/+layout.svelte
+47
-0
src/routes/(app)/playground/+page.svelte
src/routes/(app)/playground/+page.svelte
+1
-11
No files found.
src/routes/(app)/playground/+layout.svelte
0 → 100644
View file @
465c3a99
<script lang="ts">
import { onMount, getContext } from 'svelte';
import { WEBUI_NAME, showSidebar, functions } from '$lib/stores';
import MenuLines from '$lib/components/icons/MenuLines.svelte';
import { page } from '$app/stores';
const i18n = getContext('i18n');
onMount(async () => {});
</script>
<svelte:head>
<title>
{$i18n.t('Playground')} | {$WEBUI_NAME}
</title>
</svelte:head>
<div
class=" flex flex-col w-full min-h-screen max-h-screen {$showSidebar
? 'md:max-w-[calc(100%-260px)]'
: ''}"
>
<div class=" px-4 pt-3 mt-0.5 mb-1">
<div class=" flex items-center gap-1">
<div class="{$showSidebar ? 'md:hidden' : ''} mr-1 self-start flex flex-none items-center">
<button
id="sidebar-toggle-button"
class="cursor-pointer p-1 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
on:click={() => {
showSidebar.set(!$showSidebar);
}}
>
<div class=" m-auto self-center">
<MenuLines />
</div>
</button>
</div>
<div class="flex items-center text-xl font-semibold">{$i18n.t('Playground')}</div>
</div>
</div>
<hr class=" my-2 dark:border-gray-850" />
<div class=" py-1 px-5 flex-1 max-h-full overflow-y-auto">
<slot />
</div>
</div>
src/routes/(app)/playground/+page.svelte
View file @
465c3a99
<script>
<script>
import { showSidebar } from '$lib/stores';
import Playground from '$lib/components/playground/Playground.svelte';
import Playground from '$lib/components/playground/Playground.svelte';
</script>
</script>
<div
<Playground />
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>
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