Add visual feedback to save button, add user agent
This commit is contained in:
parent
96a48576c5
commit
1e6ed38ce5
4 changed files with 13 additions and 1 deletions
|
@ -62,6 +62,7 @@
|
|||
</div>
|
||||
<footer>
|
||||
<button type="submit" class="btn btn-primary">Show Text</button>
|
||||
<button type="button" class="btn btn-secondary" id="restartBtn">Restart</button>
|
||||
</footer>
|
||||
</form>
|
||||
<hr>
|
||||
|
@ -186,7 +187,7 @@
|
|||
<h3>Screens</h3>
|
||||
<div id="outputScreens"></div>
|
||||
<button type="submit" class="btn btn-secondary">Reset</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
<button type="submit" class="btn btn-primary" id="saveSettingsBtn">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -80,11 +80,17 @@ settingsForm.onsubmit = (event) => {
|
|||
method: "post"
|
||||
}).then(() => {
|
||||
console.log('Submitted');
|
||||
document.getElementById('saveSettingsBtn')?.classList.add('btn-success');
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById('restartBtn').onclick = (event) => {
|
||||
fetch('/api/restart');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var ledsForm = document.querySelector('#ledsForm');
|
||||
ledsForm.onsubmit = (event) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue