mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac: disable rich text input in knowledge base
This commit is contained in:
parent
e304ca5bd5
commit
efebf4d3a0
1 changed files with 18 additions and 10 deletions
|
|
@ -50,6 +50,7 @@
|
||||||
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
import LockClosed from '$lib/components/icons/LockClosed.svelte';
|
||||||
import AccessControlModal from '../common/AccessControlModal.svelte';
|
import AccessControlModal from '../common/AccessControlModal.svelte';
|
||||||
import Search from '$lib/components/icons/Search.svelte';
|
import Search from '$lib/components/icons/Search.svelte';
|
||||||
|
import Textarea from '$lib/components/common/Textarea.svelte';
|
||||||
|
|
||||||
let largeScreen = true;
|
let largeScreen = true;
|
||||||
|
|
||||||
|
|
@ -230,7 +231,13 @@
|
||||||
// Function to update the UI with the progress
|
// Function to update the UI with the progress
|
||||||
const updateProgress = () => {
|
const updateProgress = () => {
|
||||||
const percentage = (uploadedFiles / totalFiles) * 100;
|
const percentage = (uploadedFiles / totalFiles) * 100;
|
||||||
toast.info($i18n.t("Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)", { uploadedFiles: uploadedFiles, totalFiles: totalFiles, percentage: percentage.toFixed(2) }));
|
toast.info(
|
||||||
|
$i18n.t('Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)', {
|
||||||
|
uploadedFiles: uploadedFiles,
|
||||||
|
totalFiles: totalFiles,
|
||||||
|
percentage: percentage.toFixed(2)
|
||||||
|
})
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Recursive function to count all files excluding hidden ones
|
// Recursive function to count all files excluding hidden ones
|
||||||
|
|
@ -314,8 +321,11 @@
|
||||||
const updateProgress = () => {
|
const updateProgress = () => {
|
||||||
const percentage = (uploadedFiles / totalFiles) * 100;
|
const percentage = (uploadedFiles / totalFiles) * 100;
|
||||||
toast.info(
|
toast.info(
|
||||||
$i18n.t("Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)",
|
$i18n.t('Upload Progress: {{uploadedFiles}}/{{totalFiles}} ({{percentage}}%)', {
|
||||||
{ uploadedFiles: uploadedFiles, totalFiles: totalFiles, percentage: percentage.toFixed(2) })
|
uploadedFiles: uploadedFiles,
|
||||||
|
totalFiles: totalFiles,
|
||||||
|
percentage: percentage.toFixed(2)
|
||||||
|
})
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -673,7 +683,7 @@
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="flex flex-col w-full translate-y-1" id="collection-container">
|
<div class="flex flex-col w-full h-full translate-y-1" id="collection-container">
|
||||||
{#if id && knowledge}
|
{#if id && knowledge}
|
||||||
<AccessControlModal
|
<AccessControlModal
|
||||||
bind:show={showAccessControlModal}
|
bind:show={showAccessControlModal}
|
||||||
|
|
@ -777,11 +787,10 @@
|
||||||
class=" flex-1 w-full h-full max-h-full text-sm bg-transparent outline-hidden overflow-y-auto scrollbar-hidden"
|
class=" flex-1 w-full h-full max-h-full text-sm bg-transparent outline-hidden overflow-y-auto scrollbar-hidden"
|
||||||
>
|
>
|
||||||
{#key selectedFile.id}
|
{#key selectedFile.id}
|
||||||
<RichTextInput
|
<textarea
|
||||||
className="input-prose-sm"
|
class="w-full h-full outline-none resize-none"
|
||||||
bind:value={selectedFileContent}
|
bind:value={selectedFileContent}
|
||||||
placeholder={$i18n.t('Add content here')}
|
placeholder={$i18n.t('Add content here')}
|
||||||
preserveBreaks={false}
|
|
||||||
/>
|
/>
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -835,11 +844,10 @@
|
||||||
class=" flex-1 w-full h-full max-h-full py-2.5 px-3.5 rounded-lg text-sm bg-transparent overflow-y-auto scrollbar-hidden"
|
class=" flex-1 w-full h-full max-h-full py-2.5 px-3.5 rounded-lg text-sm bg-transparent overflow-y-auto scrollbar-hidden"
|
||||||
>
|
>
|
||||||
{#key selectedFile.id}
|
{#key selectedFile.id}
|
||||||
<RichTextInput
|
<textarea
|
||||||
className="input-prose-sm"
|
class="w-full h-full outline-none resize-none"
|
||||||
bind:value={selectedFileContent}
|
bind:value={selectedFileContent}
|
||||||
placeholder={$i18n.t('Add content here')}
|
placeholder={$i18n.t('Add content here')}
|
||||||
preserveBreaks={false}
|
|
||||||
/>
|
/>
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue