diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 9e2fb1b29..4b2e18e39 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -33,7 +33,7 @@ import ArchivedChatsModal from './Sidebar/ArchivedChatsModal.svelte'; import UserMenu from './Sidebar/UserMenu.svelte'; - const BREAKPOINT = 1024; + const BREAKPOINT = 768; let show = false; let navElement; @@ -274,7 +274,7 @@ {#if $user?.role === 'admin'} -
+
+ + + {$i18n.t('Documents')} | {$WEBUI_NAME} + + + {#if dragged}
import { WEBUI_API_BASE_URL } from '$lib/constants'; - import { WEBUI_NAME, config, user } from '$lib/stores'; + import { WEBUI_NAME, config, user, showSidebar } from '$lib/stores'; import { goto } from '$app/navigation'; import { onMount, getContext } from 'svelte'; @@ -12,6 +12,9 @@ import { updateUserRole, getUsers, deleteUserById } from '$lib/apis/users'; import { getSignUpEnabledStatus, toggleSignUpEnabledStatus } from '$lib/apis/auths'; + + import MenuLines from '$lib/components/icons/MenuLines.svelte'; + import EditUserModal from '$lib/components/admin/EditUserModal.svelte'; import SettingsModal from '$lib/components/admin/SettingsModal.svelte'; import Pagination from '$lib/components/common/Pagination.svelte'; @@ -23,6 +26,7 @@ const i18n = getContext('i18n'); let loaded = false; + let tab = ''; let users = []; let search = ''; @@ -102,252 +106,258 @@ -
+
{#if loaded} -
-
-
-
-
-
-
{$i18n.t('Dashboard')}
-
- - - -
-
+
+
+
+ +
+
{$i18n.t('Dashboard')}
+
+
-
-
- {$i18n.t('Overview')} -
- -
+
+
+ +
+
-
+
-
-
-
- {$i18n.t('All Users')} -
- {users.length} -
+
+
+
+ {$i18n.t('All Users')} +
+ {users.length} +
-
- + + +
+ + + -
- - - -
-
-
- -
- - - - - - - - - - - - - - {#each users - .filter((user) => { - if (search === '') { - return true; - } else { - let name = user.name.toLowerCase(); - const query = search.toLowerCase(); - return name.includes(query); - } - }) - .slice((page - 1) * 20, page * 20) as user} - - - - - - - - - - - - {/each} - -
{$i18n.t('Role')} {$i18n.t('Name')} {$i18n.t('Email')} {$i18n.t('Last Active')} {$i18n.t('Created at')} -
- - -
- user - -
{user.name}
-
-
{user.email} - {dayjs(user.last_active_at * 1000).fromNow()} - - {dayjs(user.created_at * 1000).format($i18n.t('MMMM DD, YYYY'))} - -
- {#if user.role !== 'admin'} - - - - - - - - - - - - {/if} -
-
-
- -
- ⓘ {$i18n.t("Click on the user role button to change a user's role.")} -
- - -
+ + +
+ +
+ + + + + + + + + + + + + + {#each users + .filter((user) => { + if (search === '') { + return true; + } else { + let name = user.name.toLowerCase(); + const query = search.toLowerCase(); + return name.includes(query); + } + }) + .slice((page - 1) * 20, page * 20) as user} + + + + + + + + + + + + {/each} + +
{$i18n.t('Role')} {$i18n.t('Name')} {$i18n.t('Email')} {$i18n.t('Last Active')} {$i18n.t('Created at')} +
+ + +
+ user + +
{user.name}
+
+
{user.email} + {dayjs(user.last_active_at * 1000).fromNow()} + + {dayjs(user.created_at * 1000).format($i18n.t('MMMM DD, YYYY'))} + +
+ {#if user.role !== 'admin'} + + + + + + + + + + + + {/if} +
+
+
+ +
+ ⓘ {$i18n.t("Click on the user role button to change a user's role.")} +
+ +
{/if}
diff --git a/src/routes/(app)/workspace/+page.svelte b/src/routes/(app)/workspace/+page.svelte index 7415a6c69..2a74ba163 100644 --- a/src/routes/(app)/workspace/+page.svelte +++ b/src/routes/(app)/workspace/+page.svelte @@ -90,12 +90,12 @@
-
-
+
+
{$i18n.t('Modelfiles')} {$i18n.t('Prompts')} + {$i18n.t('Documents')} + {$i18n.t('Playground')}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3445acaa9..3c992ee8d 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -18,7 +18,7 @@ setContext('i18n', i18n); let loaded = false; - const BREAKPOINT = 1024; + const BREAKPOINT = 768; onMount(async () => { theme.set(localStorage.theme);