mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 05:45:19 +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 name = '';
|
||||||
export let collapsible = true;
|
export let collapsible = true;
|
||||||
|
|
||||||
|
export let chevron = true;
|
||||||
export let onAddLabel: string = '';
|
export let onAddLabel: string = '';
|
||||||
export let onAdd: null | Function = null;
|
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"
|
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">
|
<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 chevron}
|
||||||
{#if open}
|
<div class="text-gray-300 dark:text-gray-600">
|
||||||
<ChevronDown className=" size-3" strokeWidth="2.5" />
|
{#if open}
|
||||||
{:else}
|
<ChevronDown className=" size-3" strokeWidth="2.5" />
|
||||||
<ChevronRight className=" size-3" strokeWidth="2.5" />
|
{:else}
|
||||||
{/if}
|
<ChevronRight className=" size-3" strokeWidth="2.5" />
|
||||||
</div>
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="translate-y-[0.5px]">
|
<div class="translate-y-[0.5px]">
|
||||||
{name}
|
{name}
|
||||||
|
|
|
||||||
|
|
@ -847,6 +847,7 @@
|
||||||
<Folder
|
<Folder
|
||||||
className="px-2 mt-0.5"
|
className="px-2 mt-0.5"
|
||||||
name={$i18n.t('Channels')}
|
name={$i18n.t('Channels')}
|
||||||
|
chevron={false}
|
||||||
dragAndDrop={false}
|
dragAndDrop={false}
|
||||||
onAdd={async () => {
|
onAdd={async () => {
|
||||||
if ($user?.role === 'admin') {
|
if ($user?.role === 'admin') {
|
||||||
|
|
@ -873,6 +874,7 @@
|
||||||
<Folder
|
<Folder
|
||||||
className="px-2 mt-0.5"
|
className="px-2 mt-0.5"
|
||||||
name={$i18n.t('Chats')}
|
name={$i18n.t('Chats')}
|
||||||
|
chevron={false}
|
||||||
onAdd={() => {
|
onAdd={() => {
|
||||||
showCreateFolderModal = true;
|
showCreateFolderModal = true;
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue