mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 13:25:20 +00:00
refac
This commit is contained in:
parent
029db5c635
commit
1588f42fe7
2 changed files with 12 additions and 7 deletions
|
|
@ -16,6 +16,7 @@
|
|||
export let name = '';
|
||||
export let collapsible = true;
|
||||
|
||||
export let chevron = true;
|
||||
export let onAddLabel: string = '';
|
||||
export let onAdd: null | Function = null;
|
||||
|
||||
|
|
@ -140,13 +141,15 @@
|
|||
class="w-full group rounded-md relative flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-900 text-gray-500 dark:text-gray-500 transition"
|
||||
>
|
||||
<button class="w-full py-1.5 pl-2 flex items-center gap-1.5 text-xs font-medium">
|
||||
<div class="text-gray-300 dark:text-gray-600">
|
||||
{#if open}
|
||||
<ChevronDown className=" size-3" strokeWidth="2.5" />
|
||||
{:else}
|
||||
<ChevronRight className=" size-3" strokeWidth="2.5" />
|
||||
{/if}
|
||||
</div>
|
||||
{#if chevron}
|
||||
<div class="text-gray-300 dark:text-gray-600">
|
||||
{#if open}
|
||||
<ChevronDown className=" size-3" strokeWidth="2.5" />
|
||||
{:else}
|
||||
<ChevronRight className=" size-3" strokeWidth="2.5" />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="translate-y-[0.5px]">
|
||||
{name}
|
||||
|
|
|
|||
|
|
@ -847,6 +847,7 @@
|
|||
<Folder
|
||||
className="px-2 mt-0.5"
|
||||
name={$i18n.t('Channels')}
|
||||
chevron={false}
|
||||
dragAndDrop={false}
|
||||
onAdd={async () => {
|
||||
if ($user?.role === 'admin') {
|
||||
|
|
@ -873,6 +874,7 @@
|
|||
<Folder
|
||||
className="px-2 mt-0.5"
|
||||
name={$i18n.t('Chats')}
|
||||
chevron={false}
|
||||
onAdd={() => {
|
||||
showCreateFolderModal = true;
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue