mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix reset logic
This commit is contained in:
parent
d9eab7f383
commit
754525be82
@ -61,7 +61,7 @@
|
|||||||
<input type="file" id="initimg" name="initimg" accept=".jpg, .jpeg, .png">
|
<input type="file" id="initimg" name="initimg" accept=".jpg, .jpeg, .png">
|
||||||
<label title="Set to -1 for random seed" for="seed">Seed:</label>
|
<label title="Set to -1 for random seed" for="seed">Seed:</label>
|
||||||
<input value="-1" type="number" id="seed" name="seed">
|
<input value="-1" type="number" id="seed" name="seed">
|
||||||
<button type="button" id="reset">↺</button>
|
<button type="button" id="reset-seed">↺</button>
|
||||||
<span>•</span>
|
<span>•</span>
|
||||||
<button type="button" id="reset-all">Reset to Defaults</button>
|
<button type="button" id="reset-all">Reset to Defaults</button>
|
||||||
<br>
|
<br>
|
||||||
|
@ -47,8 +47,10 @@ function loadFields(form) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearFields(form) {
|
function clearFields(form) {
|
||||||
localStorage.clear()
|
localStorage.clear();
|
||||||
location.reload()
|
let prompt = form.prompt.value;
|
||||||
|
form.reset();
|
||||||
|
form.prompt.value = prompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generateSubmit(form) {
|
async function generateSubmit(form) {
|
||||||
@ -116,7 +118,7 @@ window.onload = () => {
|
|||||||
document.querySelector("#generate-form").addEventListener('change', (e) => {
|
document.querySelector("#generate-form").addEventListener('change', (e) => {
|
||||||
saveFields(e.target.form);
|
saveFields(e.target.form);
|
||||||
});
|
});
|
||||||
document.querySelector("#reset").addEventListener('click', (e) => {
|
document.querySelector("#reset-seed").addEventListener('click', (e) => {
|
||||||
document.querySelector("#seed").value = -1;
|
document.querySelector("#seed").value = -1;
|
||||||
saveFields(e.target.form);
|
saveFields(e.target.form);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user