|
@@ -198,6 +198,19 @@
|
|
|
});
|
|
|
|
|
|
let showDeleteConfirm = false;
|
|
|
+
|
|
|
+ const chatTitleInputKeydownHandler = (e) => {
|
|
|
+ if (e.key === 'Enter') {
|
|
|
+ e.preventDefault();
|
|
|
+ editChatTitle(id, chatTitle);
|
|
|
+ confirmEdit = false;
|
|
|
+ chatTitle = '';
|
|
|
+ } else if (e.key === 'Escape') {
|
|
|
+ e.preventDefault();
|
|
|
+ confirmEdit = false;
|
|
|
+ chatTitle = '';
|
|
|
+ }
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<ShareChatModal bind:show={showShareChatModal} chatId={id} />
|
|
@@ -246,6 +259,7 @@
|
|
|
bind:value={chatTitle}
|
|
|
id="chat-title-input-{id}"
|
|
|
class=" bg-transparent w-full outline-hidden mr-10"
|
|
|
+ on:keydown={chatTitleInputKeydownHandler}
|
|
|
/>
|
|
|
</div>
|
|
|
{:else}
|