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
1d980990
Commit
1d980990
authored
May 14, 2024
by
Timothy J. Baek
Browse files
refac: admin panel styling
parent
e9decf2d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
260 additions
and
242 deletions
+260
-242
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+2
-2
src/lib/components/workspace/Documents.svelte
src/lib/components/workspace/Documents.svelte
+6
-0
src/routes/(app)/admin/+page.svelte
src/routes/(app)/admin/+page.svelte
+242
-232
src/routes/(app)/workspace/+page.svelte
src/routes/(app)/workspace/+page.svelte
+9
-7
src/routes/+layout.svelte
src/routes/+layout.svelte
+1
-1
No files found.
src/lib/components/layout/Sidebar.svelte
View file @
1d980990
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
import ArchivedChatsModal from './Sidebar/ArchivedChatsModal.svelte';
import ArchivedChatsModal from './Sidebar/ArchivedChatsModal.svelte';
import UserMenu from './Sidebar/UserMenu.svelte';
import UserMenu from './Sidebar/UserMenu.svelte';
const BREAKPOINT =
1024
;
const BREAKPOINT =
768
;
let show = false;
let show = false;
let navElement;
let navElement;
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
</div>
</div>
{#if $user?.role === 'admin'}
{#if $user?.role === 'admin'}
<div class="px-1.5 flex justify-center">
<div class="px-1.5 flex justify-center
text-gray-800 dark:text-gray-200
">
<a
<a
class="flex-grow flex space-x-3 rounded-xl px-3.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
class="flex-grow flex space-x-3 rounded-xl px-3.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
href="/workspace"
href="/workspace"
...
...
src/lib/components/workspace/Documents.svelte
View file @
1d980990
...
@@ -151,6 +151,12 @@
...
@@ -151,6 +151,12 @@
);
);
</script>
</script>
<svelte:head>
<title>
{$i18n.t('Documents')} | {$WEBUI_NAME}
</title>
</svelte:head>
{#if dragged}
{#if dragged}
<div
<div
class="fixed w-full h-full flex z-50 touch-none pointer-events-none"
class="fixed w-full h-full flex z-50 touch-none pointer-events-none"
...
...
src/routes/(app)/admin/+page.svelte
View file @
1d980990
This diff is collapsed.
Click to expand it.
src/routes/(app)/workspace/+page.svelte
View file @
1d980990
...
@@ -90,12 +90,12 @@
...
@@ -90,12 +90,12 @@
</svelte:head>
</svelte:head>
<div class=" flex flex-col w-full min-h-screen">
<div class=" flex flex-col w-full min-h-screen">
<div class=" px-4 pt-3 mb-
1.5
">
<div class=" px-4 pt-3 mb-
2
">
<div class=" flex items-center">
<div class=" flex items-center
gap-1
">
<div class="{$showSidebar ? 'md:hidden' : ''} mr-1 self-start flex flex-none items-center">
<div class="{$showSidebar ? 'md:hidden' : ''} mr-1 self-start flex flex-none items-center">
<button
<button
id="sidebar-toggle-button"
id="sidebar-toggle-button"
class="cursor-pointer p-
2
flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
class="cursor-pointer p-
1
flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
on:click={() => {
on:click={() => {
showSidebar.set(!$showSidebar);
showSidebar.set(!$showSidebar);
}}
}}
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
type="button"
type="button"
on:click={() => {
on:click={() => {
tab = '';
tab = '';
}}>Modelfiles</button
}}>
{$i18n.t('
Modelfiles
')}
</button
>
>
<button
<button
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
type="button"
type="button"
on:click={() => {
on:click={() => {
tab = 'prompts';
tab = 'prompts';
}}>Prompts</button
}}>
{$i18n.t('
Prompts
')}
</button
>
>
<button
<button
...
@@ -140,8 +140,10 @@
...
@@ -140,8 +140,10 @@
type="button"
type="button"
on:click={() => {
on:click={() => {
tab = 'documents';
tab = 'documents';
}}
>Documents</button
}}
>
>
{$i18n.t('Documents')}
</button>
<button
<button
class="min-w-fit rounded-lg p-1.5 px-3 {tab === 'playground'
class="min-w-fit rounded-lg p-1.5 px-3 {tab === 'playground'
...
@@ -150,7 +152,7 @@
...
@@ -150,7 +152,7 @@
type="button"
type="button"
on:click={() => {
on:click={() => {
tab = 'playground';
tab = 'playground';
}}>Playground</button
}}>
{$i18n.t('
Playground
')}
</button
>
>
</div>
</div>
</div>
</div>
...
...
src/routes/+layout.svelte
View file @
1d980990
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
setContext('i18n', i18n);
setContext('i18n', i18n);
let loaded = false;
let loaded = false;
const BREAKPOINT =
1024
;
const BREAKPOINT =
768
;
onMount(async () => {
onMount(async () => {
theme.set(localStorage.theme);
theme.set(localStorage.theme);
...
...
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