forked from open-webui/open-webui
feat: navbar ui update
This commit is contained in:
parent
ce20f05ef1
commit
0c367412c3
14 changed files with 408 additions and 152 deletions
|
@ -8,7 +8,7 @@
|
|||
export let addTag: Function;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row space-x-0.5 line-clamp-1">
|
||||
<div class="flex flex-row flex-wrap gap-0.5 line-clamp-1">
|
||||
<TagList
|
||||
{tags}
|
||||
on:delete={(e) => {
|
||||
|
@ -17,6 +17,7 @@
|
|||
/>
|
||||
|
||||
<TagInput
|
||||
label={tags.length == 0 ? 'Add Tags' : ''}
|
||||
on:add={(e) => {
|
||||
addTag(e.detail);
|
||||
}}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
export let label = '';
|
||||
let showTagInput = false;
|
||||
let tagName = '';
|
||||
|
||||
|
@ -34,7 +35,7 @@
|
|||
</button>
|
||||
<input
|
||||
bind:value={tagName}
|
||||
class=" pl-2 cursor-pointer self-center text-xs h-fit bg-transparent outline-none line-clamp-1 w-[8rem]"
|
||||
class=" pl-2 cursor-pointer self-center text-xs h-fit bg-transparent outline-none line-clamp-1 w-[5.5rem]"
|
||||
placeholder={$i18n.t('Add a tag')}
|
||||
list="tagOptions"
|
||||
on:keydown={(event) => {
|
||||
|
@ -71,4 +72,8 @@
|
|||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
{#if label && !showTagInput}
|
||||
<span class="text-xs pl-1.5 self-center">{label}</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
{#each tags as tag}
|
||||
<div
|
||||
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-600 dark:text-white"
|
||||
class="px-2 py-0.5 space-x-1 flex h-fit items-center rounded-full transition border dark:border-gray-800 dark:text-white"
|
||||
>
|
||||
<div class=" text-[0.7rem] font-medium self-center line-clamp-1">
|
||||
{tag.name}
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<div bind:this={tooltipElement} aria-label={content}>
|
||||
<div bind:this={tooltipElement} aria-label={content} class="flex">
|
||||
<slot />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue