@@ -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}
+
+
{
+ deleteChat(chat.id);
+ }}
+ >
+
+
+
{
+ chatDeleteId = null;
+ }}
+ >
+
+
+
{:else}
{
chatTitle = chat.title;
- chatTitleEditIdx = chat.id;
+ chatTitleEditId = chat.id;
// editChatTitle(chat.id, 'a');
}}
>
@@ -334,7 +365,7 @@
{
- deleteChat(chat.id);
+ chatDeleteId = chat.id;
}}
>