refac
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class=" text-xs font-medium {classNames[type] ??
|
||||
class=" text-xs font-normal {classNames[type] ??
|
||||
classNames['info']} w-fit px-[5px] rounded-lg uppercase line-clamp-1 mr-0.5"
|
||||
>
|
||||
{content}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class=" flex flex-col md:flex-row md:items-center flex-1 text-sm w-fit gap-1.5">
|
||||
<div class="flex justify-between self-start">
|
||||
<div
|
||||
class=" text-xs font-semibold {classNames[banner.type] ??
|
||||
class=" text-xs font-normal {classNames[banner.type] ??
|
||||
classNames['info']} w-fit px-2 rounded-sm uppercase line-clamp-1 mr-0.5"
|
||||
>
|
||||
{#if banner.type.toLowerCase() === 'info'}
|
||||
@@ -71,7 +71,7 @@
|
||||
{#if banner.url}
|
||||
<div class="flex md:hidden group w-fit md:items-center">
|
||||
<a
|
||||
class="text-gray-700 dark:text-white text-xs font-semibold underline"
|
||||
class="text-gray-700 dark:text-white text-xs font-normal underline"
|
||||
href="{WEBUI_BASE_URL}/assets/files/whitepaper.pdf"
|
||||
target="_blank"
|
||||
>
|
||||
@@ -107,7 +107,7 @@
|
||||
{#if banner.url}
|
||||
<div class="hidden md:flex group w-fit md:items-center">
|
||||
<a
|
||||
class="text-gray-700 dark:text-white text-xs font-semibold underline"
|
||||
class="text-gray-700 dark:text-white text-xs font-normal underline"
|
||||
href="/"
|
||||
target="_blank"
|
||||
>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<div>
|
||||
{#if chatList && chatList.length > 0}
|
||||
<div class="flex text-xs font-medium mb-1.5">
|
||||
<div class="flex text-xs font-normal mb-1.5">
|
||||
{#if showUserInfo}
|
||||
{#if onSort}
|
||||
<button
|
||||
@@ -126,7 +126,7 @@
|
||||
{#each chatList as chat, idx (chat.id)}
|
||||
{#if chat.time_range && (idx === 0 || chat.time_range !== chatList[idx - 1]?.time_range)}
|
||||
<div
|
||||
class="w-full text-xs text-gray-500 dark:text-gray-500 font-medium {idx === 0
|
||||
class="w-full text-xs text-gray-500 dark:text-gray-500 font-normal {idx === 0
|
||||
? ''
|
||||
: 'pt-5'} pb-2 px-2"
|
||||
>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div
|
||||
class=" sticky top-0 z-30 flex justify-between bg-white px-4.5 pt-3 pb-3 dark:bg-gray-900 dark:text-gray-100"
|
||||
>
|
||||
<div class=" font-primary self-center text-lg font-medium">
|
||||
<div class=" self-center text-lg font-normal">
|
||||
{$i18n.t('Code Editor')}
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
}}
|
||||
>
|
||||
<div class="px-[1.75rem] py-6 flex flex-col">
|
||||
<div class=" text-lg font-medium dark:text-gray-200 mb-2.5">
|
||||
<div class=" text-lg font-normal dark:text-gray-200 mb-2.5">
|
||||
{#if title !== ''}
|
||||
{title}
|
||||
{:else}
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
<div class="mt-6 flex justify-between gap-1.5">
|
||||
<button
|
||||
class="text-sm bg-gray-100 hover:bg-gray-200 text-gray-800 dark:bg-gray-850 dark:hover:bg-gray-800 dark:text-white font-medium w-full py-2 rounded-3xl transition"
|
||||
class="text-sm bg-gray-100 hover:bg-gray-200 text-gray-800 dark:bg-gray-850 dark:hover:bg-gray-800 dark:text-white font-normal w-full py-2 rounded-3xl transition"
|
||||
on:click={() => {
|
||||
cancelHandler();
|
||||
}}
|
||||
@@ -186,7 +186,7 @@
|
||||
{cancelLabel}
|
||||
</button>
|
||||
<button
|
||||
class="text-sm bg-gray-900 hover:bg-gray-850 text-gray-100 dark:bg-gray-100 dark:hover:bg-white dark:text-gray-800 font-medium w-full py-2 rounded-3xl transition"
|
||||
class="text-sm bg-gray-900 hover:bg-gray-850 text-gray-100 dark:bg-gray-100 dark:hover:bg-white dark:text-gray-800 font-normal w-full py-2 rounded-3xl transition"
|
||||
on:click={() => {
|
||||
confirmHandler();
|
||||
}}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<div class="w-full mb-2.5">
|
||||
{#if item.length === 1 && item[0].type === 'group'}
|
||||
<!-- Render group header -->
|
||||
<div class="text-xs font-medium -mb-1 text-gray-500 dark:text-gray-400">
|
||||
<div class="text-xs font-normal -mb-1 text-gray-500 dark:text-gray-400">
|
||||
{item[0].label}
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
{#if !small}
|
||||
<div class="flex flex-col justify-center -space-y-0.5 px-2.5 w-full">
|
||||
<div class=" dark:text-gray-100 text-sm font-medium line-clamp-1 mb-1">
|
||||
<div class=" dark:text-gray-100 text-sm font-normal line-clamp-1 mb-1">
|
||||
{decodeString(name)}
|
||||
</div>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<Tooltip content={decodeString(name)} className="flex flex-col w-full" placement="top-start">
|
||||
<div class="flex flex-col justify-center -space-y-0.5 px-1 w-full">
|
||||
<div class=" dark:text-gray-100 text-sm flex justify-between items-center">
|
||||
<div class="font-medium line-clamp-1 flex-1 pr-1">{decodeString(name)}</div>
|
||||
<div class="font-normal line-clamp-1 flex-1 pr-1">{decodeString(name)}</div>
|
||||
{#if size}
|
||||
<div class="text-gray-500 text-xs capitalize shrink-0">{formatFileSize(size)}</div>
|
||||
{:else}
|
||||
|
||||
@@ -257,11 +257,11 @@
|
||||
</script>
|
||||
|
||||
<Modal bind:show size="lg">
|
||||
<div class="font-primary px-4.5 py-3.5 w-full flex flex-col justify-center dark:text-gray-400">
|
||||
<div class=" px-4.5 py-3.5 w-full flex flex-col justify-center dark:text-gray-400">
|
||||
<div class=" pb-2">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<div class=" font-medium text-lg dark:text-gray-100">
|
||||
<div class=" font-normal text-lg dark:text-gray-100">
|
||||
<a
|
||||
href="#"
|
||||
class="hover:underline line-clamp-1"
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
{#if isAudio || isPDF || isExcel || isCode || isMarkdown || isDocx || isPptx}
|
||||
<div
|
||||
class="flex mb-2.5 scrollbar-none overflow-x-auto w-full border-b border-gray-50 dark:border-gray-850/30 text-center text-sm font-medium bg-transparent dark:text-gray-200"
|
||||
class="flex mb-2.5 scrollbar-none overflow-x-auto w-full border-b border-gray-50 dark:border-gray-850/30 text-center text-sm font-normal bg-transparent dark:text-gray-200"
|
||||
>
|
||||
<button
|
||||
class="min-w-fit py-1.5 px-4 border-b {selectedTab === ''
|
||||
@@ -526,7 +526,7 @@
|
||||
{:else}
|
||||
{#if excelSheetNames.length > 1}
|
||||
<div
|
||||
class="flex mb-2.5 scrollbar-none overflow-x-auto w-full border-b border-gray-50 dark:border-gray-850/30 text-center text-sm font-medium bg-transparent dark:text-gray-200"
|
||||
class="flex mb-2.5 scrollbar-none overflow-x-auto w-full border-b border-gray-50 dark:border-gray-850/30 text-center text-sm font-normal bg-transparent dark:text-gray-200"
|
||||
>
|
||||
{#each excelSheetNames as sheetName}
|
||||
<button
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
id="sidebar-folder-button"
|
||||
class=" w-full group rounded-xl relative flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-900 transition {buttonClassName}"
|
||||
>
|
||||
<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-normal">
|
||||
{#if chevron}
|
||||
<div class=" p-[1px]">
|
||||
{#if open}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div
|
||||
class=" sticky top-0 z-30 flex justify-between bg-white px-4.5 pt-3 pb-3 dark:bg-gray-900 dark:text-gray-100"
|
||||
>
|
||||
<div class=" font-primary self-center text-lg">
|
||||
<div class=" self-center text-lg">
|
||||
{$i18n.t('Input')}
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
{#if content !== ''}
|
||||
<div class="text-center text-gray-100 text-xs font-medium z-50">
|
||||
<div class="text-center text-gray-100 text-xs font-normal z-50">
|
||||
{content}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
class="px-1.5 py-1 min-w-[3rem] text-center text-[11px] font-medium text-gray-500 dark:text-gray-400 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 transition tabular-nums"
|
||||
class="px-1.5 py-1 min-w-[3rem] text-center text-[11px] font-normal text-gray-500 dark:text-gray-400 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 transition tabular-nums"
|
||||
on:click={resetView}
|
||||
aria-label="Reset zoom"
|
||||
>
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
<div class="flex items-center gap-2.5">
|
||||
{#each pages as page (page.key)}
|
||||
{#if page.type === 'ellipsis'}
|
||||
<div class="text-sm font-medium text-foreground-alt">...</div>
|
||||
<div class="text-sm font-normal text-foreground-alt">...</div>
|
||||
{:else}
|
||||
<Pagination.Page
|
||||
{page}
|
||||
class="inline-flex size-8 items-center justify-center rounded-[9px] bg-transparent hover:bg-gray-50 dark:hover:bg-gray-850 text-sm font-medium hover:bg-dark-10 active:scale-98 disabled:cursor-not-allowed disabled:opacity-50 hover:disabled:bg-transparent data-selected:bg-gray-50 data-selected:text-gray-700 data-selected:hover:bg-gray-100 dark:data-selected:bg-gray-850 dark:data-selected:text-gray-50 dark:data-selected:hover:bg-gray-800 transition"
|
||||
class="inline-flex size-8 items-center justify-center rounded-[9px] bg-transparent hover:bg-gray-50 dark:hover:bg-gray-850 text-sm font-normal hover:bg-dark-10 active:scale-98 disabled:cursor-not-allowed disabled:opacity-50 hover:disabled:bg-transparent data-selected:bg-gray-50 data-selected:text-gray-700 data-selected:hover:bg-gray-100 dark:data-selected:bg-gray-850 dark:data-selected:text-gray-50 dark:data-selected:hover:bg-gray-800 transition"
|
||||
>
|
||||
{page.value}
|
||||
</Pagination.Page>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
>
|
||||
<svelte:fragment slot="trigger" let:selectedLabel>
|
||||
<span
|
||||
class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate text-lg font-semibold placeholder-gray-400 focus:outline-hidden"
|
||||
class="inline-flex h-input px-0.5 w-full outline-hidden bg-transparent truncate text-lg font-normal placeholder-gray-400 focus:outline-hidden"
|
||||
>
|
||||
{selectedLabel}
|
||||
</span>
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="px-3 my-2 max-h-80 overflow-y-auto">
|
||||
{#each filteredItems as item}
|
||||
<button
|
||||
class="flex w-full font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-850 rounded-lg cursor-pointer"
|
||||
class="flex w-full font-normal line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-850 rounded-lg cursor-pointer"
|
||||
type="button"
|
||||
on:click={() => selectItem(item)}
|
||||
>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{:else}
|
||||
<button
|
||||
type="button"
|
||||
class="flex items-center gap-2 px-3 py-1.5 rounded-lg bg-gray-200/80 dark:bg-gray-700 text-gray-500 dark:text-blue-400 text-sm font-medium hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors"
|
||||
class="flex items-center gap-2 px-3 py-1.5 rounded-lg bg-gray-200/80 dark:bg-gray-700 text-gray-500 dark:text-blue-400 text-sm font-normal hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors"
|
||||
on:click={openInput}
|
||||
>
|
||||
<span>+</span>
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
{#if tag}
|
||||
{#if disabled}
|
||||
<span
|
||||
class="flex items-center gap-1 px-1.5 py-[1px] rounded-full bg-gray-100/50 dark:bg-gray-800/50 border border-gray-100 dark:border-gray-800 text-gray-600 dark:text-gray-300 text-xs font-medium"
|
||||
class="flex items-center gap-1 px-1.5 py-[1px] rounded-full bg-gray-100/50 dark:bg-gray-800/50 border border-gray-100 dark:border-gray-800 text-gray-600 dark:text-gray-300 text-xs font-normal"
|
||||
>
|
||||
<span class="line-clamp-1">{tag.name}</span>
|
||||
</span>
|
||||
{:else}
|
||||
<button
|
||||
type="button"
|
||||
class="flex items-center gap-1 px-1.5 py-[1px] rounded-full bg-gray-100/50 dark:bg-gray-800/50 border border-gray-100 dark:border-gray-800 text-gray-600 dark:text-gray-300 text-xs font-medium hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
class="flex items-center gap-1 px-1.5 py-[1px] rounded-full bg-gray-100/50 dark:bg-gray-800/50 border border-gray-100 dark:border-gray-800 text-gray-600 dark:text-gray-300 text-xs font-normal hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
|
||||
on:click={() => {
|
||||
onDelete();
|
||||
}}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class="w-full max-w-full font-medium flex items-center gap-1.5 {isExecuting
|
||||
class="w-full max-w-full font-normal flex items-center gap-1.5 {isExecuting
|
||||
? 'shimmer'
|
||||
: ''}"
|
||||
>
|
||||
@@ -189,7 +189,7 @@
|
||||
{#if args}
|
||||
<div>
|
||||
<div
|
||||
class="text-[10px] uppercase tracking-wider font-medium text-gray-400 dark:text-gray-500 mb-1.5 px-1"
|
||||
class="text-[10px] uppercase tracking-wider font-normal text-gray-400 dark:text-gray-500 mb-1.5 px-1"
|
||||
>
|
||||
{$i18n.t('Input')}
|
||||
</div>
|
||||
@@ -198,7 +198,7 @@
|
||||
<div class="px-1 space-y-0.5">
|
||||
{#each Object.entries(parsedArgs) as [key, value]}
|
||||
<div class="flex gap-2 text-xs py-0.5">
|
||||
<span class="font-medium text-gray-600 dark:text-gray-400 shrink-0"
|
||||
<span class="font-normal text-gray-600 dark:text-gray-400 shrink-0"
|
||||
>{key}</span
|
||||
>
|
||||
<span class="text-gray-800 dark:text-gray-200 break-all"
|
||||
@@ -222,7 +222,7 @@
|
||||
{#if isDone && result}
|
||||
<div>
|
||||
<div
|
||||
class="text-[10px] uppercase tracking-wider font-medium text-gray-400 dark:text-gray-500 mb-1.5 px-1"
|
||||
class="text-[10px] uppercase tracking-wider font-normal text-gray-400 dark:text-gray-500 mb-1.5 px-1"
|
||||
>
|
||||
{$i18n.t('Output')}
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{#each Object.keys(valvesSpec.properties) as property}
|
||||
<div class=" py-0.5 w-full justify-between">
|
||||
<div class="flex w-full justify-between">
|
||||
<div class=" self-center text-xs font-medium">
|
||||
<div class=" self-center text-xs font-normal">
|
||||
{valvesSpec.properties[property].title}
|
||||
|
||||
{#if (valvesSpec?.required ?? []).includes(property)}
|
||||
|
||||
Reference in New Issue
Block a user