forked from open-webui/open-webui
rf: dom queries in Models component
This commit is contained in:
parent
f4f6724d96
commit
fe040ce82b
1 changed files with 3 additions and 4 deletions
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
let showLiteLLM = false;
|
let showLiteLLM = false;
|
||||||
let showLiteLLMParams = false;
|
let showLiteLLMParams = false;
|
||||||
|
let modelUploadInputElement: HTMLInputElement;
|
||||||
let liteLLMModelInfo = [];
|
let liteLLMModelInfo = [];
|
||||||
|
|
||||||
let liteLLMModel = '';
|
let liteLLMModel = '';
|
||||||
|
@ -546,6 +546,7 @@
|
||||||
<div class="flex-1 {modelInputFile && modelInputFile.length > 0 ? 'mr-2' : ''}">
|
<div class="flex-1 {modelInputFile && modelInputFile.length > 0 ? 'mr-2' : ''}">
|
||||||
<input
|
<input
|
||||||
id="model-upload-input"
|
id="model-upload-input"
|
||||||
|
bind:this={modelUploadInputElement}
|
||||||
type="file"
|
type="file"
|
||||||
bind:files={modelInputFile}
|
bind:files={modelInputFile}
|
||||||
on:change={() => {
|
on:change={() => {
|
||||||
|
@ -559,9 +560,7 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="w-full rounded text-left py-2 px-4 dark:text-gray-300 dark:bg-gray-850"
|
class="w-full rounded text-left py-2 px-4 dark:text-gray-300 dark:bg-gray-850"
|
||||||
on:click={() => {
|
on:click={modelUploadInputElement.click}
|
||||||
document.getElementById('model-upload-input').click();
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{#if modelInputFile && modelInputFile.length > 0}
|
{#if modelInputFile && modelInputFile.length > 0}
|
||||||
{modelInputFile[0].name}
|
{modelInputFile[0].name}
|
||||||
|
|
Loading…
Reference in a new issue