added id and class

This commit is contained in:
Andrew Baek
2025-09-26 01:23:58 +09:00
parent 5be58f2601
commit 86f024b9d7
7 changed files with 24 additions and 11 deletions
@@ -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]'