mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 10:17:00 +00:00
refac: layout load
This commit is contained in:
parent
a3e477e100
commit
0611eb8ac7
@ -45,6 +45,7 @@
|
|||||||
import AccountPending from '$lib/components/layout/Overlay/AccountPending.svelte';
|
import AccountPending from '$lib/components/layout/Overlay/AccountPending.svelte';
|
||||||
import UpdateInfoToast from '$lib/components/layout/UpdateInfoToast.svelte';
|
import UpdateInfoToast from '$lib/components/layout/UpdateInfoToast.svelte';
|
||||||
import { get } from 'svelte/store';
|
import { get } from 'svelte/store';
|
||||||
|
import Spinner from '$lib/components/common/Spinner.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@ -254,7 +255,6 @@
|
|||||||
<div
|
<div
|
||||||
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 h-screen max-h-[100dvh] overflow-auto flex flex-row justify-end"
|
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 h-screen max-h-[100dvh] overflow-auto flex flex-row justify-end"
|
||||||
>
|
>
|
||||||
{#if loaded}
|
|
||||||
{#if !['user', 'admin'].includes($user?.role)}
|
{#if !['user', 'admin'].includes($user?.role)}
|
||||||
<AccountPending />
|
<AccountPending />
|
||||||
{:else if localDBChats.length > 0}
|
{:else if localDBChats.length > 0}
|
||||||
@ -312,7 +312,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
|
|
||||||
|
{#if loaded}
|
||||||
<slot />
|
<slot />
|
||||||
|
{:else}
|
||||||
|
<div class="w-full flex-1 h-full flex items-center justify-center">
|
||||||
|
<Spinner />
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user