refac: styling

This commit is contained in:
Timothy J. Baek
2024-05-14 22:22:15 -10:00
parent 13019acce6
commit 308a2e1de0
4 changed files with 23 additions and 18 deletions

View File

@@ -8,7 +8,8 @@
chatId,
tags,
showSidebar,
mobile
mobile,
showArchivedChats
} from '$lib/stores';
import { onMount, getContext } from 'svelte';
@@ -49,7 +50,6 @@
let chatTitleEditId = null;
let chatTitle = '';
let showArchivedChatsModal = false;
let showShareChatModal = false;
let showDropdown = false;
let isEditing = false;
@@ -186,7 +186,7 @@
<ShareChatModal bind:show={showShareChatModal} chatId={shareChatId} />
<ArchivedChatsModal
bind:show={showArchivedChatsModal}
bind:show={$showArchivedChats}
on:change={async () => {
await chats.set(await getChatList(localStorage.token));
}}
@@ -581,6 +581,9 @@
shareChatId = selectedChatId;
showShareChatModal = true;
}}
archiveChatHandler={() => {
archiveChatHandler(chat.id);
}}
renameHandler={() => {
chatTitle = chat.title;
chatTitleEditId = chat.id;
@@ -612,18 +615,6 @@
</button>
</ChatMenu>
<Tooltip content={$i18n.t('Archive')}>
<button
aria-label="Archive"
class=" self-center dark:hover:text-white transition"
on:click={() => {
archiveChatHandler(chat.id);
}}
>
<ArchiveBox />
</button>
</Tooltip>
{#if chat.id === $chatId}
<button
id="delete-chat-button"
@@ -662,7 +653,7 @@
role={$user.role}
on:show={(e) => {
if (e.detail === 'archived-chat') {
showArchivedChatsModal = true;
showArchivedChats.set(true);
}
}}
>