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
00b01c97
Commit
00b01c97
authored
Apr 20, 2024
by
Timothy J. Baek
Browse files
feat: archive button
parent
f0416437
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
src/lib/components/icons/ArchiveBox.svelte
src/lib/components/icons/ArchiveBox.svelte
+19
-0
src/lib/components/layout/Sidebar.svelte
src/lib/components/layout/Sidebar.svelte
+14
-1
No files found.
src/lib/components/icons/ArchiveBox.svelte
0 → 100644
View file @
00b01c97
<script lang="ts">
export let className = 'size-3.5';
export let strokeWidth = '2.5';
</script>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width={strokeWidth}
stroke="currentColor"
class={className}
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"
/>
</svg>
src/lib/components/layout/Sidebar.svelte
View file @
00b01c97
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
import Tooltip from '../common/Tooltip.svelte';
import Tooltip from '../common/Tooltip.svelte';
import ChatMenu from './Sidebar/ChatMenu.svelte';
import ChatMenu from './Sidebar/ChatMenu.svelte';
import ShareChatModal from '../chat/ShareChatModal.svelte';
import ShareChatModal from '../chat/ShareChatModal.svelte';
import ArchiveBox from '../icons/ArchiveBox.svelte';
let show = false;
let show = false;
let navElement;
let navElement;
...
@@ -550,7 +551,7 @@
...
@@ -550,7 +551,7 @@
</button>
</button>
</div>
</div>
{:else}
{:else}
<div class="flex self-center space-x-1
.5
z-10">
<div class="flex self-center space-x-1 z-10">
<ChatMenu
<ChatMenu
chatId={chat.id}
chatId={chat.id}
shareHandler={() => {
shareHandler={() => {
...
@@ -587,6 +588,18 @@
...
@@ -587,6 +588,18 @@
</svg>
</svg>
</button>
</button>
</ChatMenu>
</ChatMenu>
<Tooltip content="Archive">
<button
aria-label="Archive"
class=" self-center dark:hover:text-white transition"
on:click={() => {
selectedChatId = chat.id;
}}
>
<ArchiveBox />
</button>
</Tooltip>
</div>
</div>
{/if}
{/if}
</div>
</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