mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 22:35:23 +00:00
refac: styling
This commit is contained in:
parent
19e3214997
commit
3f27d9ada1
2 changed files with 105 additions and 100 deletions
|
|
@ -940,6 +940,29 @@
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{#if folders || $pinnedChats.length > 0}
|
||||||
|
<div class="mb-1">
|
||||||
|
{#if folders}
|
||||||
|
<Folders
|
||||||
|
{folders}
|
||||||
|
{shiftKey}
|
||||||
|
onDelete={(folderId) => {
|
||||||
|
selectedFolder.set(null);
|
||||||
|
initChatList();
|
||||||
|
}}
|
||||||
|
on:update={() => {
|
||||||
|
initChatList();
|
||||||
|
}}
|
||||||
|
on:import={(e) => {
|
||||||
|
const { folderId, items } = e.detail;
|
||||||
|
importChatHandler(items, false, folderId);
|
||||||
|
}}
|
||||||
|
on:change={async () => {
|
||||||
|
initChatList();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if $pinnedChats.length > 0}
|
{#if $pinnedChats.length > 0}
|
||||||
<div class="flex flex-col space-y-1 rounded-xl">
|
<div class="flex flex-col space-y-1 rounded-xl">
|
||||||
<Folder
|
<Folder
|
||||||
|
|
@ -985,7 +1008,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!chat.pinned) {
|
if (!chat.pinned) {
|
||||||
const res = await toggleChatPinnedStatusById(localStorage.token, chat.id);
|
const res = await toggleChatPinnedStatusById(
|
||||||
|
localStorage.token,
|
||||||
|
chat.id
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
initChatList();
|
initChatList();
|
||||||
|
|
@ -1023,27 +1049,6 @@
|
||||||
</Folder>
|
</Folder>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if folders}
|
|
||||||
<div class="mb-1">
|
|
||||||
<Folders
|
|
||||||
{folders}
|
|
||||||
{shiftKey}
|
|
||||||
onDelete={(folderId) => {
|
|
||||||
selectedFolder.set(null);
|
|
||||||
initChatList();
|
|
||||||
}}
|
|
||||||
on:update={() => {
|
|
||||||
initChatList();
|
|
||||||
}}
|
|
||||||
on:import={(e) => {
|
|
||||||
const { folderId, items } = e.detail;
|
|
||||||
importChatHandler(items, false, folderId);
|
|
||||||
}}
|
|
||||||
on:change={async () => {
|
|
||||||
initChatList();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@
|
||||||
<div class="w-full group">
|
<div class="w-full group">
|
||||||
<button
|
<button
|
||||||
id="folder-{folderId}-button"
|
id="folder-{folderId}-button"
|
||||||
class="relative w-full py-1 px-1.5 rounded-lg flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-500 font-medium hover:bg-gray-100 dark:hover:bg-gray-900 transition {$selectedFolder?.id ===
|
class="relative w-full py-1 px-1.5 rounded-lg flex items-center gap-1.5 hover:bg-gray-100 dark:hover:bg-gray-900 transition {$selectedFolder?.id ===
|
||||||
folderId
|
folderId
|
||||||
? 'bg-gray-100 dark:bg-gray-900'
|
? 'bg-gray-100 dark:bg-gray-900'
|
||||||
: ''}"
|
: ''}"
|
||||||
|
|
@ -464,7 +464,7 @@
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="text-gray-300 dark:text-gray-600 transition-all p-[3px] dark:hover:bg-gray-850 rounded-lg"
|
class="text-gray-500 dark:text-gray-500 transition-all p-[3px] hover:bg-gray-200 dark:hover:bg-gray-850 rounded-lg"
|
||||||
on:click={(e) => {
|
on:click={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
open = !open;
|
open = !open;
|
||||||
|
|
@ -518,7 +518,7 @@
|
||||||
edit = false;
|
edit = false;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
class="w-full h-full bg-transparent text-gray-500 dark:text-gray-500 outline-hidden"
|
class="w-full h-full bg-transparent outline-hidden"
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
{folders[folderId].name}
|
{folders[folderId].name}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue