Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
5640b386
Commit
5640b386
authored
Feb 27, 2024
by
Timothy J. Baek
Browse files
fix: title edit issue
parent
32361dc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
22 deletions
+26
-22
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+26
-22
No files found.
src/lib/components/layout/Sidebar.svelte
View file @
5640b386
...
@@ -366,28 +366,34 @@
...
@@ -366,28 +366,34 @@
}
}
}) as chat, i}
}) as chat, i}
<div class=" w-full pr-2 relative">
<div class=" w-full pr-2 relative">
<a
{#if chatTitleEditId === chat.id}
class=" w-full flex justify-between rounded-xl px-3 py-2 hover:bg-gray-900 {chat.id ===
<div
$chatId
class=" w-full flex justify-between rounded-xl px-3 py-2 hover:bg-gray-900 {chat.id ===
? 'bg-gray-900'
$chatId
: ''} transition whitespace-nowrap text-ellipsis"
? 'bg-gray-900'
href="/c/{chat.id}"
: ''} transition whitespace-nowrap text-ellipsis"
draggable={isEditing ? 'false' : 'true'}
>
>
<input bind:value={chatTitle} class=" bg-transparent w-full outline-none mr-10" />
<div class=" flex self-center flex-1 w-full">
</div>
<div
{:else}
class=" text-left self-center overflow-hidden {chat.id === $chatId
<a
? 'w-[160px]'
class=" w-full flex justify-between rounded-xl px-3 py-2 hover:bg-gray-900 {chat.id ===
: 'w-full'} "
$chatId
>
? 'bg-gray-900'
{#if chatTitleEditId === chat.id}
: ''} transition whitespace-nowrap text-ellipsis"
<input bind:value={chatTitle} class=" bg-transparent w-full" />
href="/c/{chat.id}"
{:else}
>
<div class=" flex self-center flex-1 w-full">
<div
class=" text-left self-center overflow-hidden {chat.id === $chatId
? 'w-[160px]'
: 'w-full'} "
>
{chat.title}
{chat.title}
{/if}
</div>
</div>
</div>
</
div
>
</
a
>
</a>
{/if}
{#if chat.id === $chatId}
{#if chat.id === $chatId}
<div class=" absolute right-[22px] top-[10px]">
<div class=" absolute right-[22px] top-[10px]">
...
@@ -399,7 +405,6 @@
...
@@ -399,7 +405,6 @@
editChatTitle(chat.id, chatTitle);
editChatTitle(chat.id, chatTitle);
chatTitleEditId = null;
chatTitleEditId = null;
chatTitle = '';
chatTitle = '';
isEditing = false;
}}
}}
>
>
<svg
<svg
...
@@ -487,7 +492,6 @@
...
@@ -487,7 +492,6 @@
on:click={() => {
on:click={() => {
chatTitle = chat.title;
chatTitle = chat.title;
chatTitleEditId = chat.id;
chatTitleEditId = chat.id;
isEditing = true;
}}
}}
>
>
<svg
<svg
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment