mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-19 23:19:10 +08:00
refac: collection styling
This commit is contained in:
parent
854024cdf8
commit
5a78f1d915
@ -553,6 +553,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="flex flex-col w-full max-h-[100dvh] h-full">
|
<div class="flex flex-col w-full max-h-[100dvh] h-full">
|
||||||
|
<div class="flex items-center justify-between">
|
||||||
<button
|
<button
|
||||||
class="flex space-x-1 w-fit"
|
class="flex space-x-1 w-fit"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
@ -576,42 +577,14 @@
|
|||||||
<div class=" self-center font-medium text-sm">{$i18n.t('Back')}</div>
|
<div class=" self-center font-medium text-sm">{$i18n.t('Back')}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="flex flex-col my-2 flex-1 overflow-auto h-0">
|
|
||||||
{#if id && knowledge}
|
|
||||||
<div class=" flex w-full mt-1 mb-3.5">
|
|
||||||
<div class="flex-1">
|
|
||||||
<div class="flex items-center justify-between w-full px-0.5 mb-1">
|
|
||||||
<div class="w-full">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="w-full font-medium text-2xl font-primary bg-transparent outline-none"
|
|
||||||
bind:value={knowledge.name}
|
|
||||||
on:input={() => {
|
|
||||||
changeDebounceHandler();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class=" flex-shrink-0">
|
<div class=" flex-shrink-0">
|
||||||
<div>
|
<div>
|
||||||
<Badge type="success" content="Collection" />
|
<Badge type="success" content="Collection" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-col my-2 flex-1 overflow-auto h-0">
|
||||||
<div class="flex w-full px-1">
|
{#if id && knowledge}
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="w-full text-gray-500 text-sm bg-transparent outline-none"
|
|
||||||
bind:value={knowledge.description}
|
|
||||||
on:input={() => {
|
|
||||||
changeDebounceHandler();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex flex-row h-0 flex-1 overflow-auto">
|
<div class="flex flex-row h-0 flex-1 overflow-auto">
|
||||||
<div
|
<div
|
||||||
class=" {largeScreen
|
class=" {largeScreen
|
||||||
@ -669,7 +642,7 @@
|
|||||||
files={filteredItems}
|
files={filteredItems}
|
||||||
{selectedFileId}
|
{selectedFileId}
|
||||||
on:click={(e) => {
|
on:click={(e) => {
|
||||||
selectedFileId = e.detail;
|
selectedFileId = selectedFileId === e.detail ? null : e.detail;
|
||||||
}}
|
}}
|
||||||
on:delete={(e) => {
|
on:delete={(e) => {
|
||||||
console.log(e.detail);
|
console.log(e.detail);
|
||||||
@ -716,12 +689,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="m-auto">
|
<div class="m-auto pb-24">
|
||||||
<AddFilesPlaceholder title={$i18n.t('Select/Add Files')}>
|
<div>
|
||||||
<div class=" mt-2 text-center text-sm dark:text-gray-200 w-full">
|
<div class=" flex w-full mt-1 mb-3.5">
|
||||||
|
<div class="flex-1">
|
||||||
|
<div class="flex items-center justify-between w-full px-0.5 mb-1">
|
||||||
|
<div class="w-full">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="text-center w-full font-medium text-3xl font-primary bg-transparent outline-none"
|
||||||
|
bind:value={knowledge.name}
|
||||||
|
on:input={() => {
|
||||||
|
changeDebounceHandler();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex w-full px-1">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="text-center w-full text-gray-500 bg-transparent outline-none"
|
||||||
|
bind:value={knowledge.description}
|
||||||
|
on:input={() => {
|
||||||
|
changeDebounceHandler();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class=" mt-2 text-center text-sm dark:text-gray-700 w-full">
|
||||||
Select a file to view or drag and drop a file to upload
|
Select a file to view or drag and drop a file to upload
|
||||||
</div>
|
</div>
|
||||||
</AddFilesPlaceholder>
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user