mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 06:45:24 +00:00
enh: checkbox input variable
This commit is contained in:
parent
2cde746e38
commit
6f98379c82
1 changed files with 7 additions and 3 deletions
|
|
@ -104,19 +104,23 @@
|
||||||
</select>
|
</select>
|
||||||
{:else if variables[variable]?.type === 'checkbox'}
|
{:else if variables[variable]?.type === 'checkbox'}
|
||||||
<div class="flex items-center space-x-2">
|
<div class="flex items-center space-x-2">
|
||||||
<div class="relative size-6 flex justify-center items-center">
|
<div class="relative flex justify-center items-center gap-2">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={variableValues[variable]}
|
bind:checked={variableValues[variable]}
|
||||||
class="size-3.5 rounded cursor-pointer border border-gray-200 dark:border-gray-700"
|
class="size-3.5 rounded cursor-pointer border border-gray-200 dark:border-gray-700"
|
||||||
id="input-variable-{idx}"
|
id="input-variable-{idx}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<label for="input-variable-{idx}" class="text-sm"
|
||||||
|
>{variables[variable]?.label ?? variable}</label
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="flex-1 py-2 text-sm dark:text-gray-300 bg-transparent outline-hidden"
|
class="flex-1 py-1 text-sm dark:text-gray-300 bg-transparent outline-hidden"
|
||||||
placeholder="Enter checkbox label"
|
placeholder="Enter value (true/false)"
|
||||||
bind:value={variableValues[variable]}
|
bind:value={variableValues[variable]}
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
required
|
required
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue