mirror of
https://github.com/open-webui/open-webui
synced 2025-01-29 13:58:09 +00:00
feat: automatically focus title input when editing
This commit is contained in:
parent
6022f6f5df
commit
db3d48ee15
@ -205,6 +205,10 @@
|
|||||||
await archiveChatById(localStorage.token, id);
|
await archiveChatById(localStorage.token, id);
|
||||||
await chats.set(await getChatList(localStorage.token));
|
await chats.set(await getChatList(localStorage.token));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const focusEdit = async (node: HTMLInputElement) => {
|
||||||
|
node.focus();
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ShareChatModal bind:show={showShareChatModal} chatId={shareChatId} />
|
<ShareChatModal bind:show={showShareChatModal} chatId={shareChatId} />
|
||||||
@ -489,7 +493,11 @@
|
|||||||
? 'bg-gray-100 dark:bg-gray-950'
|
? 'bg-gray-100 dark:bg-gray-950'
|
||||||
: 'group-hover:bg-gray-100 dark:group-hover:bg-gray-950'} whitespace-nowrap text-ellipsis"
|
: '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>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<a
|
<a
|
||||||
|
Loading…
Reference in New Issue
Block a user