feat: archive button

This commit is contained in:
Timothy J. Baek 2024-04-20 16:13:16 -05:00
parent f04164378a
commit 00b01c973e
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,19 @@
<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>

View File

@ -25,6 +25,7 @@
import Tooltip from '../common/Tooltip.svelte';
import ChatMenu from './Sidebar/ChatMenu.svelte';
import ShareChatModal from '../chat/ShareChatModal.svelte';
import ArchiveBox from '../icons/ArchiveBox.svelte';
let show = false;
let navElement;
@ -550,7 +551,7 @@
</button>
</div>
{:else}
<div class="flex self-center space-x-1.5 z-10">
<div class="flex self-center space-x-1 z-10">
<ChatMenu
chatId={chat.id}
shareHandler={() => {
@ -587,6 +588,18 @@
</svg>
</button>
</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>
{/if}
</div>