refac: styling
This commit is contained in:
1 parent
07b16cc8d1
commit
2bfe684716
14 files changed
+185
-161
No files matched your search
@@ -8,8 +8,9 @@
|
|||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
|
||||||
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
||||||
import MenuLines from '../icons/MenuLines.svelte';
|
|
||||||
import PencilSquare from '../icons/PencilSquare.svelte';
|
import PencilSquare from '../icons/PencilSquare.svelte';
|
||||||
|
import Tooltip from '../common/Tooltip.svelte';
|
||||||
|
import Sidebar from '../icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -26,20 +27,21 @@
|
|||||||
<div
|
<div
|
||||||
class="{$showSidebar
|
class="{$showSidebar
|
||||||
? 'md:hidden'
|
? 'md:hidden'
|
||||||
: ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
: ''} mr-1.5 mt-0.5 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
||||||
>
|
>
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer px-2 py-2 flex rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -24,11 +24,11 @@
|
|||||||
import Tooltip from '../common/Tooltip.svelte';
|
import Tooltip from '../common/Tooltip.svelte';
|
||||||
import Menu from '$lib/components/layout/Navbar/Menu.svelte';
|
import Menu from '$lib/components/layout/Navbar/Menu.svelte';
|
||||||
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
||||||
import MenuLines from '../icons/MenuLines.svelte';
|
|
||||||
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
|
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
|
||||||
|
|
||||||
import PencilSquare from '../icons/PencilSquare.svelte';
|
import PencilSquare from '../icons/PencilSquare.svelte';
|
||||||
import Banner from '../common/Banner.svelte';
|
import Banner from '../common/Banner.svelte';
|
||||||
|
import Sidebar from '../icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -70,34 +70,34 @@
|
|||||||
<div
|
<div
|
||||||
class="{$showSidebar
|
class="{$showSidebar
|
||||||
? 'md:hidden'
|
? 'md:hidden'
|
||||||
: ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
: ''} mr-1.5 mt-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
||||||
>
|
>
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer px-2 py-2 flex rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
showSidebar.set(!$showSidebar);
|
showSidebar.set(!$showSidebar);
|
||||||
}}
|
}}
|
||||||
aria-label="Toggle Sidebar"
|
>
|
||||||
>
|
<div class=" self-center p-1.5">
|
||||||
<div class=" m-auto self-center">
|
<Sidebar />
|
||||||
<MenuLines />
|
</div>
|
||||||
</div>
|
</button>
|
||||||
</button>
|
</Tooltip>
|
||||||
|
|
||||||
{#if !$mobile}
|
{#if !$mobile}
|
||||||
<Tooltip content={$i18n.t('New Chat')}>
|
<Tooltip content={$i18n.t('New Chat')}>
|
||||||
<button
|
<button
|
||||||
class=" flex {$showSidebar
|
class=" flex {$showSidebar
|
||||||
? 'md:hidden'
|
? 'md:hidden'
|
||||||
: ''} cursor-pointer px-2 py-2 rounded-xl text-gray-600 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
: ''} cursor-pointer p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
initNewChat();
|
initNewChat();
|
||||||
}}
|
}}
|
||||||
aria-label="New Chat"
|
aria-label="New Chat"
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" m-auto self-center">
|
||||||
<PencilSquare className=" size-5" strokeWidth="2" />
|
<PencilSquare className=" size-5" strokeWidth="1.5" />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export let className = 'size-5';
|
||||||
|
export let strokeWidth = '1.5';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke-width={strokeWidth}
|
||||||
|
stroke="currentColor"
|
||||||
|
class={className}
|
||||||
|
><rect
|
||||||
|
x="3"
|
||||||
|
y="3"
|
||||||
|
width="18"
|
||||||
|
height="18"
|
||||||
|
rx="5"
|
||||||
|
ry="5"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
fill="none"
|
||||||
|
></rect><path d="M9.5 21V3" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
></path></svg
|
||||||
|
>
|
||||||
@@ -21,12 +21,11 @@
|
|||||||
import Menu from './Navbar/Menu.svelte';
|
import Menu from './Navbar/Menu.svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import UserMenu from './Sidebar/UserMenu.svelte';
|
import UserMenu from './Sidebar/UserMenu.svelte';
|
||||||
import MenuLines from '../icons/MenuLines.svelte';
|
|
||||||
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
|
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
|
||||||
import Map from '../icons/Map.svelte';
|
import Map from '../icons/Map.svelte';
|
||||||
import { stringify } from 'postcss';
|
|
||||||
import PencilSquare from '../icons/PencilSquare.svelte';
|
import PencilSquare from '../icons/PencilSquare.svelte';
|
||||||
import Plus from '../icons/Plus.svelte';
|
import Plus from '../icons/Plus.svelte';
|
||||||
|
import Sidebar from '../icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -56,18 +55,19 @@
|
|||||||
? 'md:hidden'
|
? 'md:hidden'
|
||||||
: ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
: ''} mr-1 self-start flex flex-none items-center text-gray-600 dark:text-gray-400"
|
||||||
>
|
>
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer px-2 py-2 flex rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
import FolderModal from './Sidebar/Folders/FolderModal.svelte';
|
import FolderModal from './Sidebar/Folders/FolderModal.svelte';
|
||||||
import Sortable from 'sortablejs';
|
import Sortable from 'sortablejs';
|
||||||
import { updateUserSettings } from '$lib/apis/users';
|
import { updateUserSettings } from '$lib/apis/users';
|
||||||
|
import Sidebar from '../icons/Sidebar.svelte';
|
||||||
|
|
||||||
const BREAKPOINT = 768;
|
const BREAKPOINT = 768;
|
||||||
|
|
||||||
@@ -518,15 +519,15 @@
|
|||||||
data-state={$showSidebar}
|
data-state={$showSidebar}
|
||||||
>
|
>
|
||||||
<div
|
<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'}"
|
: 'invisible'}"
|
||||||
>
|
>
|
||||||
<div
|
<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
|
<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="/"
|
href="/"
|
||||||
draggable="false"
|
draggable="false"
|
||||||
on:click={newChatHandler}
|
on:click={newChatHandler}
|
||||||
@@ -539,34 +540,23 @@
|
|||||||
/>
|
/>
|
||||||
</a>
|
</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">
|
<div class=" self-center font-medium text-gray-850 dark:text-white font-primary">
|
||||||
{$WEBUI_NAME}
|
{$WEBUI_NAME}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
class=" cursor-pointer p-[7px] flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
<button
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
>
|
}}
|
||||||
<div class=" m-auto self-center">
|
>
|
||||||
<svg
|
<div class=" self-center p-1.5">
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<Sidebar />
|
||||||
fill="none"
|
</div>
|
||||||
viewBox="0 0 24 24"
|
</button>
|
||||||
stroke-width="2"
|
</Tooltip>
|
||||||
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>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- {#if $user?.role === 'admin'}
|
<!-- {#if $user?.role === 'admin'}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@
|
|||||||
import MicSolid from '../icons/MicSolid.svelte';
|
import MicSolid from '../icons/MicSolid.svelte';
|
||||||
import VoiceRecording from '../chat/MessageInput/VoiceRecording.svelte';
|
import VoiceRecording from '../chat/MessageInput/VoiceRecording.svelte';
|
||||||
import DeleteConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
import DeleteConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||||
import MenuLines from '../icons/MenuLines.svelte';
|
|
||||||
import ChatBubbleOval from '../icons/ChatBubbleOval.svelte';
|
import ChatBubbleOval from '../icons/ChatBubbleOval.svelte';
|
||||||
|
|
||||||
import Calendar from '../icons/Calendar.svelte';
|
import Calendar from '../icons/Calendar.svelte';
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
import Bars3BottomLeft from '../icons/Bars3BottomLeft.svelte';
|
import Bars3BottomLeft from '../icons/Bars3BottomLeft.svelte';
|
||||||
import ArrowUturnLeft from '../icons/ArrowUturnLeft.svelte';
|
import ArrowUturnLeft from '../icons/ArrowUturnLeft.svelte';
|
||||||
import ArrowUturnRight from '../icons/ArrowUturnRight.svelte';
|
import ArrowUturnRight from '../icons/ArrowUturnRight.svelte';
|
||||||
import Sidebar from '../common/Sidebar.svelte';
|
import Sidebar from '../icons/Sidebar.svelte';
|
||||||
import ArrowRight from '../icons/ArrowRight.svelte';
|
import ArrowRight from '../icons/ArrowRight.svelte';
|
||||||
import Cog6 from '../icons/Cog6.svelte';
|
import Cog6 from '../icons/Cog6.svelte';
|
||||||
import AiMenu from './AIMenu.svelte';
|
import AiMenu from './AIMenu.svelte';
|
||||||
@@ -943,18 +942,21 @@ Provide the enhanced notes in markdown format. Use markdown syntax for headings,
|
|||||||
? 'md:hidden pl-0.5'
|
? 'md:hidden pl-0.5'
|
||||||
: ''} flex flex-none items-center pr-1 -translate-x-1"
|
: ''} flex flex-none items-center pr-1 -translate-x-1"
|
||||||
>
|
>
|
||||||
<button
|
<Tooltip
|
||||||
id="sidebar-toggle-button"
|
content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
|
||||||
on:click={() => {
|
|
||||||
showSidebar.set(!$showSidebar);
|
|
||||||
}}
|
|
||||||
aria-label="Toggle Sidebar"
|
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<button
|
||||||
<MenuLines />
|
id="sidebar-toggle-button"
|
||||||
</div>
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
</button>
|
on:click={() => {
|
||||||
|
showSidebar.set(!$showSidebar);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div class=" self-center p-1.5">
|
||||||
|
<Sidebar />
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
import { splitStream } from '$lib/utils';
|
import { splitStream } from '$lib/utils';
|
||||||
import Selector from '$lib/components/chat/ModelSelector/Selector.svelte';
|
import Selector from '$lib/components/chat/ModelSelector/Selector.svelte';
|
||||||
import MenuLines from '../icons/MenuLines.svelte';
|
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
import { WEBUI_NAME, showSidebar, user } from '$lib/stores';
|
import { WEBUI_NAME, showSidebar, user } from '$lib/stores';
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
import Sidebar from '$lib/components/icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -30,21 +31,22 @@
|
|||||||
? 'md:max-w-[calc(100%-260px)]'
|
? 'md:max-w-[calc(100%-260px)]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-2.5 pt-1 backdrop-blur-xl drag-region">
|
<nav class=" px-2.5 pt-1.5 backdrop-blur-xl drag-region">
|
||||||
<div class=" flex items-center gap-1">
|
<div class=" flex items-center gap-1">
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end">
|
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end">
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" flex w-full">
|
<div class=" flex w-full">
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount, getContext } from 'svelte';
|
import { onMount, getContext } from 'svelte';
|
||||||
import { WEBUI_NAME, showSidebar, functions } from '$lib/stores';
|
import { WEBUI_NAME, showSidebar, functions } from '$lib/stores';
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
import Sidebar from '$lib/components/icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -22,19 +23,20 @@
|
|||||||
>
|
>
|
||||||
<nav class=" px-2.5 pt-1 backdrop-blur-xl w-full drag-region">
|
<nav class=" px-2.5 pt-1 backdrop-blur-xl w-full drag-region">
|
||||||
<div class=" flex items-center">
|
<div class=" flex items-center">
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end">
|
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end mt-1.5">
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" flex w-full">
|
<div class=" flex w-full">
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
import { WEBUI_NAME, showSidebar, functions, config, user, showArchivedChats } from '$lib/stores';
|
import { WEBUI_NAME, showSidebar, functions, config, user, showArchivedChats } from '$lib/stores';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
|
||||||
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
let loaded = false;
|
let loaded = false;
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
|
||||||
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
import UserMenu from '$lib/components/layout/Sidebar/UserMenu.svelte';
|
||||||
import Notes from '$lib/components/notes/Notes.svelte';
|
import Notes from '$lib/components/notes/Notes.svelte';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
import Sidebar from '$lib/components/icons/Sidebar.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -14,21 +15,22 @@
|
|||||||
? 'md:max-w-[calc(100%-260px)]'
|
? 'md:max-w-[calc(100%-260px)]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-2 pt-1 backdrop-blur-xl w-full drag-region">
|
<nav class=" px-2 pt-1.5 ml-0.5 backdrop-blur-xl w-full drag-region">
|
||||||
<div class=" flex items-center">
|
<div class=" flex items-center">
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center">
|
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center">
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-2 py-0.5 self-center flex items-center justify-between w-full">
|
<div class="ml-2 py-0.5 self-center flex items-center justify-between w-full">
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount, getContext } from 'svelte';
|
import { onMount, getContext } from 'svelte';
|
||||||
import { WEBUI_NAME, showSidebar, functions } from '$lib/stores';
|
import { WEBUI_NAME, showSidebar, functions } from '$lib/stores';
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
import Sidebar from '$lib/components/icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -20,21 +21,22 @@
|
|||||||
? 'md:max-w-[calc(100%-260px)]'
|
? 'md:max-w-[calc(100%-260px)]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-2.5 pt-1 backdrop-blur-xl w-full drag-region">
|
<nav class=" px-2.5 pt-1.5 backdrop-blur-xl w-full drag-region">
|
||||||
<div class=" flex items-center">
|
<div class=" flex items-center">
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end">
|
<div class="{$showSidebar ? 'md:hidden' : ''} flex flex-none items-center self-end">
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" flex w-full">
|
<div class=" flex w-full">
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import MenuLines from '$lib/components/icons/MenuLines.svelte';
|
import Sidebar from '$lib/components/icons/Sidebar.svelte';
|
||||||
|
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
@@ -55,21 +55,22 @@
|
|||||||
? 'md:max-w-[calc(100%-260px)]'
|
? 'md:max-w-[calc(100%-260px)]'
|
||||||
: ''} max-w-full"
|
: ''} max-w-full"
|
||||||
>
|
>
|
||||||
<nav class=" px-2.5 pt-1 backdrop-blur-xl drag-region">
|
<nav class=" px-2.5 pt-1.5 backdrop-blur-xl drag-region">
|
||||||
<div class=" flex items-center gap-1">
|
<div class=" flex items-center gap-1">
|
||||||
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
<div class="{$showSidebar ? 'md:hidden' : ''} self-center flex flex-none items-center">
|
||||||
<button
|
<Tooltip content={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}>
|
||||||
id="sidebar-toggle-button"
|
<button
|
||||||
class="cursor-pointer p-1.5 flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
id="sidebar-toggle-button"
|
||||||
on:click={() => {
|
class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition cursor-"
|
||||||
showSidebar.set(!$showSidebar);
|
on:click={() => {
|
||||||
}}
|
showSidebar.set(!$showSidebar);
|
||||||
aria-label="Toggle Sidebar"
|
}}
|
||||||
>
|
>
|
||||||
<div class=" m-auto self-center">
|
<div class=" self-center p-1.5">
|
||||||
<MenuLines />
|
<Sidebar />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
import { getChatByShareId, cloneSharedChatById } from '$lib/apis/chats';
|
import { getChatByShareId, cloneSharedChatById } from '$lib/apis/chats';
|
||||||
|
|
||||||
import Messages from '$lib/components/chat/Messages.svelte';
|
import Messages from '$lib/components/chat/Messages.svelte';
|
||||||
import Navbar from '$lib/components/layout/Navbar.svelte';
|
|
||||||
|
|
||||||
import { getUserById, getUserSettings } from '$lib/apis/users';
|
import { getUserById, getUserSettings } from '$lib/apis/users';
|
||||||
import { getModels } from '$lib/apis';
|
import { getModels } from '$lib/apis';
|
||||||
|
|||||||
Reference in new issue
Block a user