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
d6905d62
Commit
d6905d62
authored
Mar 16, 2024
by
Timothy J. Baek
Browse files
feat: sidebar ui update
parent
91efd6cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
143 additions
and
144 deletions
+143
-144
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+143
-144
No files found.
src/lib/components/layout/Sidebar.svelte
View file @
d6905d62
...
...
@@ -82,7 +82,10 @@
});
if (res) {
if ($chatId === id) {
goto('/');
}
await chats.set(await getChatList(localStorage.token));
}
};
...
...
@@ -370,22 +373,22 @@
return title.includes(query) || contentMatches;
}
}) as chat, i}
<div class=" w-full pr-2 relative">
<div class=" w-full pr-2 relative
group
">
{#if chatTitleEditId === chat.id}
<div
class=" w-full flex justify-between rounded-xl px-3 py-2 hover:bg-gray-900 {chat.id ===
class=" w-full flex justify-between rounded-xl px-3 py-2
group-
hover:bg-gray-900 {chat.id ===
$chatId
? 'bg-gray-900'
: ''}
transition
whitespace-nowrap text-ellipsis"
: ''} whitespace-nowrap text-ellipsis"
>
<input bind:value={chatTitle} class=" bg-transparent w-full outline-none mr-10" />
</div>
{:else}
<a
class=" w-full flex justify-between rounded-xl px-3 py-2 hover:bg-gray-900 {chat.id ===
class=" w-full flex justify-between rounded-xl px-3 py-2
group-
hover:bg-gray-900 {chat.id ===
$chatId
? 'bg-gray-900'
: ''}
transition
whitespace-nowrap text-ellipsis"
: ''} whitespace-nowrap text-ellipsis"
href="/c/{chat.id}"
on:click={() => {
if (window.innerWidth < 1024) {
...
...
@@ -395,21 +398,18 @@
draggable="false"
>
<div class=" flex self-center flex-1 w-full">
<div
class=" text-left self-center overflow-hidden {chat.id === $chatId
? 'w-[160px]'
: 'w-full'} h-[20px]"
>
<div class=" text-left self-center overflow-hidden w-full h-[20px]">
{chat.title}
</div>
</div>
</a>
{/if}
{#if chat.id === $chatId}
<div class=" absolute right-[22px] top-[10px]">
<div
class=" invisible group-hover:visible absolute right-[14px] top-[10px] px-2 bg-gradient-to-l from-80% from-gray-900 to-transparent"
>
{#if chatTitleEditId === chat.id}
<div class="flex self-center space-x-1.5">
<div class="flex self-center space-x-1.5
z-10
">
<button
class=" self-center hover:text-white transition"
on:click={() => {
...
...
@@ -451,7 +451,7 @@
</button>
</div>
{:else if chatDeleteId === chat.id}
<div class="flex self-center space-x-1.5">
<div class="flex self-center space-x-1.5
z-10
">
<button
class=" self-center hover:text-white transition"
on:click={() => {
...
...
@@ -490,7 +490,7 @@
</button>
</div>
{:else}
<div class="flex self-center space-x-1.5">
<div class="flex self-center space-x-1.5
z-10
">
<button
id="delete-chat-button"
class=" hidden"
...
...
@@ -544,7 +544,6 @@
</div>
{/if}
</div>
{/if}
</div>
{/each}
</div>
...
...
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