|
|
@@ -528,7 +528,7 @@
|
|
|
placement="right"
|
|
|
>
|
|
|
<button
|
|
|
- class="flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group {isWindows
|
|
|
+ class="flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group {isWindows
|
|
|
? 'cursor-pointer'
|
|
|
: 'cursor-[e-resize]'}"
|
|
|
aria-label={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}
|
|
|
@@ -551,7 +551,7 @@
|
|
|
<div class="">
|
|
|
<Tooltip content={$i18n.t('New Chat')} placement="right">
|
|
|
<a
|
|
|
- class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
+ class=" cursor-pointer flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
href="/"
|
|
|
draggable="false"
|
|
|
on:click={async (e) => {
|
|
|
@@ -573,7 +573,7 @@
|
|
|
<div class="">
|
|
|
<Tooltip content={$i18n.t('Search')} placement="right">
|
|
|
<button
|
|
|
- class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
+ class=" cursor-pointer flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
on:click={(e) => {
|
|
|
e.stopImmediatePropagation();
|
|
|
e.preventDefault();
|
|
|
@@ -594,7 +594,7 @@
|
|
|
<div class="">
|
|
|
<Tooltip content={$i18n.t('Notes')} placement="right">
|
|
|
<a
|
|
|
- class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
+ class=" cursor-pointer flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
href="/notes"
|
|
|
on:click={async (e) => {
|
|
|
e.stopImmediatePropagation();
|
|
|
@@ -618,7 +618,7 @@
|
|
|
<div class="">
|
|
|
<Tooltip content={$i18n.t('Workspace')} placement="right">
|
|
|
<a
|
|
|
- class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
+ class=" cursor-pointer flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
href="/workspace"
|
|
|
on:click={async (e) => {
|
|
|
e.stopImmediatePropagation();
|
|
|
@@ -666,7 +666,7 @@
|
|
|
}}
|
|
|
>
|
|
|
<div
|
|
|
- class=" cursor-pointer flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
+ class=" cursor-pointer flex rounded-xl hover:bg-gray-100 dark:hover:bg-gray-850 transition group"
|
|
|
>
|
|
|
<div class=" self-center flex items-center justify-center size-9">
|
|
|
<img
|
|
|
@@ -704,10 +704,10 @@
|
|
|
: 'invisible'}"
|
|
|
>
|
|
|
<div
|
|
|
- class="sidebar 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"
|
|
|
+ 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"
|
|
|
>
|
|
|
<a
|
|
|
- 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"
|
|
|
+ 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"
|
|
|
href="/"
|
|
|
draggable="false"
|
|
|
on:click={newChatHandler}
|
|
|
@@ -730,7 +730,7 @@
|
|
|
placement="bottom"
|
|
|
>
|
|
|
<button
|
|
|
- class="flex rounded-lg hover:bg-gray-100 dark:hover:bg-gray-850 transition {isWindows
|
|
|
+ class="flex rounded-xl size-8.5 justify-center items-center hover:bg-gray-100/50 dark:hover:bg-gray-850/50 transition {isWindows
|
|
|
? 'cursor-pointer'
|
|
|
: 'cursor-[w-resize]'}"
|
|
|
on:click={() => {
|
|
|
@@ -743,102 +743,106 @@
|
|
|
</div>
|
|
|
</button>
|
|
|
</Tooltip>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="pb-1.5">
|
|
|
- <div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
- <a
|
|
|
- id="sidebar-new-chat-button"
|
|
|
- class="grow flex items-center space-x-3 rounded-lg px-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition outline-none"
|
|
|
- href="/"
|
|
|
- draggable="false"
|
|
|
- on:click={newChatHandler}
|
|
|
- aria-label={$i18n.t('New Chat')}
|
|
|
- >
|
|
|
- <div class="self-center">
|
|
|
- <PencilSquare className=" size-4.5" strokeWidth="2" />
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="flex self-center translate-y-[0.5px]">
|
|
|
- <div class=" self-center text-sm font-primary">{$i18n.t('New Chat')}</div>
|
|
|
- </div>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
- <button
|
|
|
- class="grow flex items-center space-x-3 rounded-lg px-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition outline-none"
|
|
|
- on:click={() => {
|
|
|
- showSearch.set(true);
|
|
|
- }}
|
|
|
- draggable="false"
|
|
|
- aria-label={$i18n.t('Search')}
|
|
|
- >
|
|
|
- <div class="self-center">
|
|
|
- <Search strokeWidth="2" className="size-4.5" />
|
|
|
- </div>
|
|
|
|
|
|
- <div class="flex self-center translate-y-[0.5px]">
|
|
|
- <div class=" self-center text-sm font-primary">{$i18n.t('Search')}</div>
|
|
|
- </div>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class=" bg-linear-to-b from-white dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10"
|
|
|
+ ></div>
|
|
|
+ </div>
|
|
|
|
|
|
- {#if ($config?.features?.enable_notes ?? false) && ($user?.role === 'admin' || ($user?.permissions?.features?.notes ?? true))}
|
|
|
+ <div class="relative flex flex-col flex-1 overflow-y-auto pt-12 pb-12">
|
|
|
+ <div class="pb-1.5">
|
|
|
<div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
<a
|
|
|
- class="grow flex items-center space-x-3 rounded-lg px-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
- href="/notes"
|
|
|
- on:click={itemClickHandler}
|
|
|
+ id="sidebar-new-chat-button"
|
|
|
+ class="grow flex items-center space-x-3 rounded-2xl px-2.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition outline-none"
|
|
|
+ href="/"
|
|
|
draggable="false"
|
|
|
- aria-label={$i18n.t('Notes')}
|
|
|
+ on:click={newChatHandler}
|
|
|
+ aria-label={$i18n.t('New Chat')}
|
|
|
>
|
|
|
<div class="self-center">
|
|
|
- <Note className="size-4.5" strokeWidth="2" />
|
|
|
+ <PencilSquare className=" size-4.5" strokeWidth="2" />
|
|
|
</div>
|
|
|
|
|
|
<div class="flex self-center translate-y-[0.5px]">
|
|
|
- <div class=" self-center text-sm font-primary">{$i18n.t('Notes')}</div>
|
|
|
+ <div class=" self-center text-sm font-primary">{$i18n.t('New Chat')}</div>
|
|
|
</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
- {/if}
|
|
|
|
|
|
- {#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools}
|
|
|
<div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
- <a
|
|
|
- class="grow flex items-center space-x-3 rounded-lg px-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
- href="/workspace"
|
|
|
- on:click={itemClickHandler}
|
|
|
+ <button
|
|
|
+ class="grow flex items-center space-x-3 rounded-2xl px-2.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition outline-none"
|
|
|
+ on:click={() => {
|
|
|
+ showSearch.set(true);
|
|
|
+ }}
|
|
|
draggable="false"
|
|
|
- aria-label={$i18n.t('Workspace')}
|
|
|
+ aria-label={$i18n.t('Search')}
|
|
|
>
|
|
|
<div class="self-center">
|
|
|
- <svg
|
|
|
- xmlns="http://www.w3.org/2000/svg"
|
|
|
- fill="none"
|
|
|
- viewBox="0 0 24 24"
|
|
|
- stroke-width="2"
|
|
|
- stroke="currentColor"
|
|
|
- class="size-4.5"
|
|
|
- >
|
|
|
- <path
|
|
|
- stroke-linecap="round"
|
|
|
- stroke-linejoin="round"
|
|
|
- d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"
|
|
|
- />
|
|
|
- </svg>
|
|
|
+ <Search strokeWidth="2" className="size-4.5" />
|
|
|
</div>
|
|
|
|
|
|
<div class="flex self-center translate-y-[0.5px]">
|
|
|
- <div class=" self-center text-sm font-primary">{$i18n.t('Workspace')}</div>
|
|
|
+ <div class=" self-center text-sm font-primary">{$i18n.t('Search')}</div>
|
|
|
</div>
|
|
|
- </a>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- {/if}
|
|
|
- </div>
|
|
|
|
|
|
- <div class="relative flex flex-col flex-1">
|
|
|
+ {#if ($config?.features?.enable_notes ?? false) && ($user?.role === 'admin' || ($user?.permissions?.features?.notes ?? true))}
|
|
|
+ <div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
+ <a
|
|
|
+ class="grow flex items-center space-x-3 rounded-2xl px-2.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
+ href="/notes"
|
|
|
+ on:click={itemClickHandler}
|
|
|
+ draggable="false"
|
|
|
+ aria-label={$i18n.t('Notes')}
|
|
|
+ >
|
|
|
+ <div class="self-center">
|
|
|
+ <Note className="size-4.5" strokeWidth="2" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="flex self-center translate-y-[0.5px]">
|
|
|
+ <div class=" self-center text-sm font-primary">{$i18n.t('Notes')}</div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+
|
|
|
+ {#if $user?.role === 'admin' || $user?.permissions?.workspace?.models || $user?.permissions?.workspace?.knowledge || $user?.permissions?.workspace?.prompts || $user?.permissions?.workspace?.tools}
|
|
|
+ <div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
|
|
+ <a
|
|
|
+ class="grow flex items-center space-x-3 rounded-2xl px-2.5 py-2 hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
+ href="/workspace"
|
|
|
+ on:click={itemClickHandler}
|
|
|
+ draggable="false"
|
|
|
+ aria-label={$i18n.t('Workspace')}
|
|
|
+ >
|
|
|
+ <div class="self-center">
|
|
|
+ <svg
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ fill="none"
|
|
|
+ viewBox="0 0 24 24"
|
|
|
+ stroke-width="2"
|
|
|
+ stroke="currentColor"
|
|
|
+ class="size-4.5"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ stroke-linecap="round"
|
|
|
+ stroke-linejoin="round"
|
|
|
+ d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"
|
|
|
+ />
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="flex self-center translate-y-[0.5px]">
|
|
|
+ <div class=" self-center text-sm font-primary">{$i18n.t('Workspace')}</div>
|
|
|
+ </div>
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+ {/if}
|
|
|
+ </div>
|
|
|
+
|
|
|
{#if ($models ?? []).length > 0 && ($settings?.pinnedModels ?? []).length > 0}
|
|
|
<PinnedModelList bind:selectedChatId {shiftKey} />
|
|
|
{/if}
|
|
|
@@ -1157,7 +1161,10 @@
|
|
|
</Folder>
|
|
|
</div>
|
|
|
|
|
|
- <div class="px-1.5 pt-1.5 pb-2 sticky bottom-0 z-10 bg-gray-50 dark:bg-gray-950 sidebar">
|
|
|
+ <div class="px-1.5 pt-1.5 pb-2 sticky bottom-0 z-10 -mt-12 sidebar">
|
|
|
+ <div
|
|
|
+ class=" bg-linear-to-t from-white dark:from-gray-950 to-transparent from-50% pointer-events-none absolute inset-0 -z-10"
|
|
|
+ ></div>
|
|
|
<div class="flex flex-col font-primary">
|
|
|
{#if $user !== undefined && $user !== null}
|
|
|
<UserMenu
|
|
|
@@ -1169,7 +1176,7 @@
|
|
|
}}
|
|
|
>
|
|
|
<div
|
|
|
- class=" flex items-center rounded-xl py-2 px-1.5 w-full hover:bg-gray-100 dark:hover:bg-gray-900 transition"
|
|
|
+ class=" flex items-center rounded-2xl py-2 px-1.5 w-full hover:bg-gray-100/50 dark:hover:bg-gray-900/50 transition"
|
|
|
>
|
|
|
<div class=" self-center mr-3">
|
|
|
<img
|