Merge pull request #9571 from Budibase/env-autofill

stop chrome autofilling login when adding environment variable
This commit is contained in:
Martin McKeaveney 2023-02-07 18:34:31 +00:00 committed by GitHub
commit e191edcceb
3 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@
export let quiet = false export let quiet = false
export let align export let align
export let autofocus = false export let autofocus = false
export let autocomplete = null
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
@ -103,6 +104,7 @@
class="spectrum-Textfield-input" class="spectrum-Textfield-input"
style={align ? `text-align: ${align};` : ""} style={align ? `text-align: ${align};` : ""}
inputmode={type === "number" ? "decimal" : "text"} inputmode={type === "number" ? "decimal" : "text"}
{autocomplete}
/> />
</div> </div>

View File

@ -14,6 +14,7 @@
export let updateOnChange = true export let updateOnChange = true
export let quiet = false export let quiet = false
export let autofocus export let autofocus
export let autocomplete
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onChange = e => { const onChange = e => {
@ -33,6 +34,7 @@
{type} {type}
{quiet} {quiet}
{autofocus} {autofocus}
{autocomplete}
on:change={onChange} on:change={onChange}
on:click on:click
on:input on:input

View File

@ -71,6 +71,7 @@
} }
}} }}
value={productionValue} value={productionValue}
autocomplete="new-password"
/> />
</div> </div>
<div> <div>
@ -83,6 +84,7 @@
disabled={useProductionValue} disabled={useProductionValue}
label="Value" label="Value"
value={useProductionValue ? productionValue : developmentValue} value={useProductionValue ? productionValue : developmentValue}
autocomplete="new-password"
/> />
<Checkbox bind:value={useProductionValue} text="Use production value" /> <Checkbox bind:value={useProductionValue} text="Use production value" />
</div> </div>