refac
This commit is contained in:
1 parent
84b1ab0ed3
commit
622767d724
17 files changed
+192
-164
No files matched your search
@@ -24,12 +24,7 @@
|
||||
import Loader from '../common/Loader.svelte';
|
||||
import { createMessagesList } from '$lib/utils';
|
||||
import { getOutputText } from '$lib/components/chat/Messages/structuredOutput';
|
||||
import {
|
||||
config,
|
||||
user,
|
||||
chatId as currentChatId,
|
||||
tags
|
||||
} from '$lib/stores';
|
||||
import { config, user, chatId as currentChatId, tags } from '$lib/stores';
|
||||
import { refreshChatList } from '$lib/stores/chat-list';
|
||||
import Messages from '../chat/Messages.svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
@@ -561,8 +556,6 @@
|
||||
messages = null;
|
||||
}}
|
||||
onKeydown={(e) => {
|
||||
console.log('e', e);
|
||||
|
||||
if (e.code === 'Enter' && (chatList ?? []).length > 0) {
|
||||
const item = document.querySelector(`[data-arrow-selected="true"]`);
|
||||
if (item) {
|
||||
@@ -585,8 +578,6 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- <hr class="border-gray-50 dark:border-gray-850/30 my-1" /> -->
|
||||
|
||||
<div class="flex px-3.5 pb-0.5">
|
||||
<div
|
||||
class="flex flex-col overflow-y-auto h-96 md:h-[40rem] max-h-full scrollbar-hidden w-full flex-1 pr-2"
|
||||
@@ -597,12 +588,12 @@
|
||||
|
||||
{#each actions as action, idx (action.label)}
|
||||
<button
|
||||
class=" w-full flex items-center rounded-xl text-sm py-1.5 px-2.5 hover:bg-gray-50 dark:hover:bg-gray-850 {selectedIdx ===
|
||||
class="w-full flex items-center rounded-lg text-sm py-1.5 px-2.5 hover:bg-gray-50/70 dark:hover:bg-gray-850/50 {selectedIdx ===
|
||||
idx
|
||||
? 'bg-gray-50 dark:bg-gray-850'
|
||||
? 'bg-gray-50/70 dark:bg-gray-850/50'
|
||||
: ''}"
|
||||
data-arrow-selected={selectedIdx === idx ? 'true' : undefined}
|
||||
dragabble="false"
|
||||
draggable="false"
|
||||
on:mouseenter={() => {
|
||||
selectedIdx = idx;
|
||||
}}
|
||||
@@ -622,7 +613,7 @@
|
||||
{/each}
|
||||
|
||||
{#if chatList}
|
||||
<hr class="border-gray-50 dark:border-gray-850/30 my-3" />
|
||||
<div aria-hidden="true" class="h-px my-3" />
|
||||
|
||||
{#if chatList.length === 0}
|
||||
<div class="text-xs text-gray-500 dark:text-gray-400 text-center px-5 py-4">
|
||||
@@ -661,9 +652,9 @@
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="w-full flex justify-between items-center rounded-xl text-sm py-1.5 pl-2.5 pr-32 hover:bg-gray-50 dark:hover:bg-gray-850 group/item relative {selectedIdx ===
|
||||
class="w-full flex justify-between items-center rounded-lg text-sm py-1.5 pl-2.5 pr-32 hover:bg-gray-50/70 dark:hover:bg-gray-850/50 group/item relative {selectedIdx ===
|
||||
idx + actions.length
|
||||
? 'bg-gray-50 dark:bg-gray-850'
|
||||
? 'bg-gray-50/70 dark:bg-gray-850/50'
|
||||
: ''}"
|
||||
data-arrow-selected={selectedIdx === idx + actions.length ? 'true' : undefined}
|
||||
on:mouseenter={() => {
|
||||
|
||||
@@ -821,7 +821,7 @@
|
||||
alt=""
|
||||
/>
|
||||
|
||||
<Sidebar className="size-4.5 hidden group-hover:flex" />
|
||||
<Sidebar className="size-4 hidden group-hover:flex" />
|
||||
</div>
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -1054,7 +1054,7 @@
|
||||
aria-label={$showSidebar ? $i18n.t('Close Sidebar') : $i18n.t('Open Sidebar')}
|
||||
>
|
||||
<div class=" self-center">
|
||||
<Sidebar className="size-4.5" />
|
||||
<Sidebar className="size-4" />
|
||||
</div>
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
Reference in new issue
Block a user