refactor Bambu credentials handling and improve input validation

This commit is contained in:
2025-02-13 09:20:02 +01:00
parent d220479709
commit 3e8e19e8dc
4 changed files with 30 additions and 14 deletions

View File

@ -32,12 +32,6 @@
.then(data => {
if (data.healthy) {
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
// Erstelle und zeige den Reboot-Button
const rebootBtn = document.createElement('button');
rebootBtn.innerText = 'Reboot now';
rebootBtn.className = 'reboot-button';
rebootBtn.onclick = () => window.location.href = '/reboot';
document.getElementById('bambuStatusMessage').appendChild(rebootBtn);
} else {
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';
}