forked from open-webui/open-webui
refac: better layout loading
This commit is contained in:
parent
2feba8af94
commit
e2447dd0a7
1 changed files with 116 additions and 116 deletions
|
@ -176,8 +176,7 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
{#if loaded}
|
||||
<div class=" hidden lg:flex fixed bottom-0 right-0 px-3 py-3 z-10">
|
||||
<div class=" hidden lg:flex fixed bottom-0 right-0 px-3 py-3 z-10">
|
||||
<Tooltip content="Help" placement="left">
|
||||
<button
|
||||
id="show-shortcuts-button"
|
||||
|
@ -190,11 +189,15 @@
|
|||
?
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ShortcutsModal bind:show={showShortcuts} />
|
||||
<ShortcutsModal bind:show={showShortcuts} />
|
||||
|
||||
<div class="app relative">
|
||||
<div class="app relative">
|
||||
<div
|
||||
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 min-h-screen overflow-auto flex flex-row"
|
||||
>
|
||||
{#if loaded}
|
||||
{#if !['user', 'admin'].includes($user.role)}
|
||||
<div class="fixed w-full h-full flex z-50">
|
||||
<div
|
||||
|
@ -214,7 +217,7 @@
|
|||
|
||||
<div class=" mt-6 mx-auto relative group w-fit">
|
||||
<button
|
||||
class="relative z-20 flex px-5 py-2 rounded-full bg-white border border-gray-100 dark:border-none hover:bg-gray-100 transition font-medium text-sm"
|
||||
class="relative z-20 flex px-5 py-2 rounded-full bg-white border border-gray-100 dark:border-none hover:bg-gray-100 text-gray-700 transition font-medium text-sm"
|
||||
on:click={async () => {
|
||||
location.href = '/';
|
||||
}}
|
||||
|
@ -288,16 +291,13 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 min-h-screen overflow-auto flex flex-row"
|
||||
>
|
||||
<Sidebar />
|
||||
<SettingsModal bind:show={$showSettings} />
|
||||
<ChangelogModal bind:show={$showChangelog} />
|
||||
<slot />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.loading {
|
||||
|
|
Loading…
Reference in a new issue