added id and class
This commit is contained in:
@@ -749,7 +749,7 @@
|
||||
<div
|
||||
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"
|
||||
: 'invisible'} sidebar-bg-gradient-to-b 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>
|
||||
|
||||
@@ -785,6 +785,7 @@
|
||||
|
||||
<div class="px-[7px] flex justify-center text-gray-800 dark:text-gray-200">
|
||||
<button
|
||||
id="sidebar-search-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);
|
||||
@@ -805,6 +806,7 @@
|
||||
{#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
|
||||
id="sidebar-notes-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"
|
||||
href="/notes"
|
||||
on:click={itemClickHandler}
|
||||
@@ -825,6 +827,7 @@
|
||||
{#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
|
||||
id="sidebar-workspace-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"
|
||||
href="/workspace"
|
||||
on:click={itemClickHandler}
|
||||
@@ -1176,7 +1179,7 @@
|
||||
|
||||
<div class="px-1.5 pt-1.5 pb-2 sticky bottom-0 z-10 -mt-3 sidebar">
|
||||
<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 -mt-6"
|
||||
class=" sidebar-bg-gradient-to-t 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 class="flex flex-col font-primary">
|
||||
{#if $user !== undefined && $user !== null}
|
||||
|
||||
@@ -44,10 +44,11 @@
|
||||
/>
|
||||
|
||||
<div
|
||||
id="sidebar-channel-item"
|
||||
bind:this={itemElement}
|
||||
class=" w-full {className} rounded-xl flex relative group hover:bg-gray-100 dark:hover:bg-gray-900 {$page
|
||||
.url.pathname === `/channels/${channel.id}`
|
||||
? 'bg-gray-100 dark:bg-gray-900'
|
||||
? 'bg-gray-100 dark:bg-gray-900 selected'
|
||||
: ''} px-2.5 py-1"
|
||||
>
|
||||
<a
|
||||
|
||||
@@ -336,17 +336,19 @@
|
||||
{/if}
|
||||
|
||||
<div
|
||||
id="sidebar-chat-group"
|
||||
bind:this={itemElement}
|
||||
class=" w-full {className} relative group"
|
||||
draggable={draggable && !confirmEdit}
|
||||
>
|
||||
{#if confirmEdit}
|
||||
<div
|
||||
id="sidebar-chat-item"
|
||||
class=" w-full flex justify-between rounded-xl px-[11px] py-[6px] {id === $chatId ||
|
||||
confirmEdit
|
||||
? 'bg-gray-100 dark:bg-gray-900'
|
||||
? 'bg-gray-100 dark:bg-gray-900 selected'
|
||||
: selected
|
||||
? 'bg-gray-100 dark:bg-gray-950'
|
||||
? 'bg-gray-100 dark:bg-gray-950 selected'
|
||||
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis relative {generating
|
||||
? 'cursor-not-allowed'
|
||||
: ''}"
|
||||
@@ -394,11 +396,12 @@
|
||||
</div>
|
||||
{:else}
|
||||
<a
|
||||
id="sidebar-chat-item"
|
||||
class=" w-full flex justify-between rounded-xl px-[11px] py-[6px] {id === $chatId ||
|
||||
confirmEdit
|
||||
? 'bg-gray-100 dark:bg-gray-900'
|
||||
? 'bg-gray-100 dark:bg-gray-900 selected'
|
||||
: selected
|
||||
? 'bg-gray-100 dark:bg-gray-950'
|
||||
? 'bg-gray-100 dark:bg-gray-950 selected'
|
||||
: ' group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
|
||||
href="/c/{id}"
|
||||
on:click={() => {
|
||||
@@ -438,11 +441,12 @@
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
id="sidebar-chat-item-menu"
|
||||
class="
|
||||
{id === $chatId || confirmEdit
|
||||
? 'from-gray-100 dark:from-gray-900'
|
||||
? 'from-gray-100 dark:from-gray-900 selected'
|
||||
: selected
|
||||
? 'from-gray-100 dark:from-gray-950'
|
||||
? 'from-gray-100 dark:from-gray-950 selected'
|
||||
: 'invisible group-hover:visible from-gray-100 dark:from-gray-950'}
|
||||
absolute {className === 'pr-2'
|
||||
? 'right-[8px]'
|
||||
|
||||
@@ -435,7 +435,7 @@
|
||||
id="folder-{folderId}-button"
|
||||
class="relative w-full py-1 px-1.5 rounded-xl flex items-center gap-1.5 hover:bg-gray-100 dark:hover:bg-gray-900 transition {$selectedFolder?.id ===
|
||||
folderId
|
||||
? 'bg-gray-100 dark:bg-gray-900'
|
||||
? 'bg-gray-100 dark:bg-gray-900 selected'
|
||||
: ''}"
|
||||
on:dblclick={(e) => {
|
||||
if (clickTimer) {
|
||||
|
||||
Reference in New Issue
Block a user