refac: styling
This commit is contained in:
@@ -21,12 +21,11 @@
|
||||
import Menu from './Navbar/Menu.svelte';
|
||||
import { page } from '$app/stores';
|
||||
import UserMenu from './Sidebar/UserMenu.svelte';
|
||||
import MenuLines from '../icons/MenuLines.svelte';
|
||||
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
|
||||
import Map from '../icons/Map.svelte';
|
||||
import { stringify } from 'postcss';
|
||||
import PencilSquare from '../icons/PencilSquare.svelte';
|
||||
import Plus from '../icons/Plus.svelte';
|
||||
import Sidebar from '../icons/Sidebar.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -56,18 +55,19 @@
|
||||
? 'md:hidden'
|
||||
: ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
||||
>
|
||||
<button
|
||||
id="sidebar-toggle-button"
|
||||
class="cursor-pointer px-2 py-2 flex rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
||||
on:click={() => {
|
||||
showSidebar.set(!$showSidebar);
|
||||
}}
|
||||
aria-label="Toggle Sidebar"
|
||||
>
|
||||
<div class=" m-auto self-center">
|
||||
<MenuLines />
|
||||
</div>
|
||||
</button>
|
||||
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||
<button
|
||||
id="sidebar-toggle-button"
|
||||
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||
on:click={() => {
|
||||
showSidebar.set(!$showSidebar);
|
||||
}}
|
||||
>
|
||||
<div class=" self-center p-1.5">
|
||||
<Sidebar />
|
||||
</div>
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
import FolderModal from './Sidebar/Folders/FolderModal.svelte';
|
||||
import Sortable from 'sortablejs';
|
||||
import { updateUserSettings } from '$lib/apis/users';
|
||||
import Sidebar from '../icons/Sidebar.svelte';
|
||||
|
||||
const BREAKPOINT = 768;
|
||||
|
||||
@@ -518,15 +519,15 @@
|
||||
data-state={$showSidebar}
|
||||
>
|
||||
<div
|
||||
class=" my-auto flex flex-col justify-between h-screen max-h-[100dvh] w-[260px] overflow-x-hidden z-50 {$showSidebar
|
||||
class=" my-auto flex flex-col justify-between h-screen max-h-[100dvh] w-[260px] overflow-x-hidden scrollbar-hidden z-50 {$showSidebar
|
||||
? ''
|
||||
: 'invisible'}"
|
||||
>
|
||||
<div
|
||||
class="px-1.5 py-2 flex justify-between space-x-1 text-gray-600 dark:text-gray-400 sticky top-0 z-10 bg-gray-50 dark:bg-gray-950"
|
||||
class="px-1.5 pt-2 pb-1.5 flex justify-between space-x-1 text-gray-600 dark:text-gray-400 sticky top-0 z-10 bg-gray-50 dark:bg-gray-950"
|
||||
>
|
||||
<a
|
||||
class="flex items-center rounded-lg p-1.5 h-full justify-center hover:bg-gray-100 dark:hover:bg-gray-900 transition no-drag-region"
|
||||
class="flex items-center rounded-lg p-1.5 h-full justify-center hover:bg-gray-100 dark:hover:bg-gray-850 transition no-drag-region"
|
||||
href="/"
|
||||
draggable="false"
|
||||
on:click={newChatHandler}
|
||||
@@ -539,34 +540,23 @@
|
||||
/>
|
||||
</a>
|
||||
|
||||
<div class="flex flex-1 px-2">
|
||||
<a href="/" class="flex flex-1 px-1.5" on:click={newChatHandler}>
|
||||
<div class=" self-center font-medium text-gray-850 dark:text-white font-primary">
|
||||
{$WEBUI_NAME}
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class=" cursor-pointer p-[7px] flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
||||
on:click={() => {
|
||||
showSidebar.set(!$showSidebar);
|
||||
}}
|
||||
>
|
||||
<div class=" m-auto self-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="2"
|
||||
stroke="currentColor"
|
||||
class="size-5"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||
<button
|
||||
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||
on:click={() => {
|
||||
showSidebar.set(!$showSidebar);
|
||||
}}
|
||||
>
|
||||
<div class=" self-center p-1.5">
|
||||
<Sidebar />
|
||||
</div>
|
||||
</button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
<!-- {#if $user?.role === 'admin'}
|
||||
|
||||
Reference in New Issue
Block a user