diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 73b6e8b3..de1ca16a 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -17,7 +17,9 @@ let title: string = 'Ollama Web UI'; let search = ''; - let chatTitleEditIdx = null; + let chatDeleteId = null; + + let chatTitleEditId = null; let chatTitle = ''; let showDropdown = false; @@ -118,25 +120,25 @@
- +
@@ -169,34 +171,24 @@ placeholder="Search" bind:value={search} /> -
- + --> +
@@ -221,8 +213,8 @@ : ''} transition whitespace-nowrap text-ellipsis" on:click={() => { // goto(`/c/${chat.id}`); - if (chat.id !== chatTitleEditIdx) { - chatTitleEditIdx = null; + if (chat.id !== chatTitleEditId) { + chatTitleEditId = null; chatTitle = ''; } @@ -253,7 +245,7 @@ ? 'w-[120px]' : 'w-[180px]'} " > - {#if chatTitleEditIdx === chat.id} + {#if chatTitleEditId === chat.id} {:else} {chat.title} @@ -264,13 +256,13 @@ {#if chat.id === $chatId}
- {#if chatTitleEditIdx === chat.id} + {#if chatTitleEditId === chat.id}
+ {:else if chatDeleteId === chat.id} +
+ + +
{:else}