Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
15e0f9de
Commit
15e0f9de
authored
Mar 03, 2024
by
Carlos Daniel Vilaseca
Browse files
rf: dom queries in AddDocModal component
parent
fe040ce8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/lib/components/documents/AddDocModal.svelte
src/lib/components/documents/AddDocModal.svelte
+11
-6
No files found.
src/lib/components/documents/AddDocModal.svelte
View file @
15e0f9de
...
...
@@ -15,7 +15,7 @@
export let show = false;
export let selectedDoc;
let uploadDocInputElement: HTMLInputElement;
let inputFiles;
let tags = [];
...
...
@@ -69,7 +69,7 @@
}
inputFiles = null;
document.getElementById('upload-doc-input')
.value = '';
uploadDocInputElement
.value = '';
} else {
toast.error(`File not found.`);
}
...
...
@@ -126,14 +126,19 @@
}}
>
<div class="mb-3 w-full">
<input id="upload-doc-input" hidden bind:files={inputFiles} type="file" multiple />
<input
id="upload-doc-input"
bind:this={uploadDocInputElement}
hidden
bind:files={inputFiles}
type="file"
multiple
/>
<button
class="w-full text-sm font-medium py-3 bg-gray-850 hover:bg-gray-800 text-center rounded-xl"
type="button"
on:click={() => {
document.getElementById('upload-doc-input')?.click();
}}
on:click={uploadDocInputElement.click}
>
{#if inputFiles}
{inputFiles.length > 0 ? `${inputFiles.length}` : ''} document(s) selected.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment