mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 08:56:39 +00:00
Merge pull request #2774 from cheahjs/feat/title-edit-improvements
feat: title edit improvements
This commit is contained in:
commit
36a66fcfc4
@ -205,6 +205,10 @@
|
||||
await archiveChatById(localStorage.token, id);
|
||||
await chats.set(await getChatList(localStorage.token));
|
||||
};
|
||||
|
||||
const focusEdit = async (node: HTMLInputElement) => {
|
||||
node.focus();
|
||||
};
|
||||
</script>
|
||||
|
||||
<ShareChatModal bind:show={showShareChatModal} chatId={shareChatId} />
|
||||
@ -489,7 +493,11 @@
|
||||
? 'bg-gray-100 dark:bg-gray-950'
|
||||
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
|
||||
>
|
||||
<input bind:value={chatTitle} class=" bg-transparent w-full outline-none mr-10" />
|
||||
<input
|
||||
use:focusEdit
|
||||
bind:value={chatTitle}
|
||||
class=" bg-transparent w-full outline-none mr-10"
|
||||
/>
|
||||
</div>
|
||||
{:else}
|
||||
<a
|
||||
@ -507,6 +515,10 @@
|
||||
showSidebar.set(false);
|
||||
}
|
||||
}}
|
||||
on:dblclick={() => {
|
||||
chatTitle = chat.title;
|
||||
chatTitleEditId = chat.id;
|
||||
}}
|
||||
draggable="false"
|
||||
>
|
||||
<div class=" flex self-center flex-1 w-full">
|
||||
|
Loading…
Reference in New Issue
Block a user