mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 05:45:19 +00:00
refac
This commit is contained in:
parent
466d5bb696
commit
834824ce7b
1 changed files with 18 additions and 16 deletions
|
|
@ -65,6 +65,8 @@
|
||||||
|
|
||||||
const BREAKPOINT = 768;
|
const BREAKPOINT = 768;
|
||||||
|
|
||||||
|
let scrollTop = 0;
|
||||||
|
|
||||||
let navElement;
|
let navElement;
|
||||||
let shiftKey = false;
|
let shiftKey = false;
|
||||||
|
|
||||||
|
|
@ -704,7 +706,7 @@
|
||||||
: 'invisible'}"
|
: 'invisible'}"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="sidebar px-1.5 pt-2 pb-2 flex justify-between space-x-1 text-gray-600 dark:text-gray-400 sticky top-0 z-10 -mb-12"
|
class="sidebar px-2 pt-2 pb-1.5 flex justify-between space-x-1 text-gray-600 dark:text-gray-400 sticky top-0 z-10 -mb-3"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
class="flex items-center rounded-xl size-8.5 h-full justify-center hover:bg-gray-100/50 dark:hover:bg-gray-850/50 transition no-drag-region"
|
class="flex items-center rounded-xl size-8.5 h-full justify-center hover:bg-gray-100/50 dark:hover:bg-gray-850/50 transition no-drag-region"
|
||||||
|
|
@ -745,11 +747,22 @@
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class=" bg-linear-to-b from-gray-50 dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10"
|
class="{scrollTop > 0
|
||||||
|
? 'visible'
|
||||||
|
: 'invisible'} bg-linear-to-b from-gray-50 dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10 -mb-6"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative flex flex-col flex-1 overflow-y-auto pt-12 pb-12">
|
<div
|
||||||
|
class="relative flex flex-col flex-1 overflow-y-auto scrollbar-hidden pt-3 pb-3"
|
||||||
|
on:scroll={(e) => {
|
||||||
|
if (e.target.scrollTop === 0) {
|
||||||
|
scrollTop = 0;
|
||||||
|
} else {
|
||||||
|
scrollTop = e.target.scrollTop;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div class="pb-1.5">
|
<div class="pb-1.5">
|
||||||
<div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
<div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
||||||
<a
|
<a
|
||||||
|
|
@ -1161,9 +1174,9 @@
|
||||||
</Folder>
|
</Folder>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-1.5 pt-1.5 pb-2 sticky bottom-0 z-10 -mt-12 sidebar">
|
<div class="px-1.5 pt-1.5 pb-2 sticky bottom-0 z-10 -mt-3 sidebar">
|
||||||
<div
|
<div
|
||||||
class=" bg-linear-to-t from-gray-50 dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10"
|
class=" bg-linear-to-t from-gray-50 dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10 -mt-6"
|
||||||
></div>
|
></div>
|
||||||
<div class="flex flex-col font-primary">
|
<div class="flex flex-col font-primary">
|
||||||
{#if $user !== undefined && $user !== null}
|
{#if $user !== undefined && $user !== null}
|
||||||
|
|
@ -1195,14 +1208,3 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
|
||||||
.scrollbar-hidden:active::-webkit-scrollbar-thumb,
|
|
||||||
.scrollbar-hidden:focus::-webkit-scrollbar-thumb,
|
|
||||||
.scrollbar-hidden:hover::-webkit-scrollbar-thumb {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
.scrollbar-hidden::-webkit-scrollbar-thumb {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue