add forced cache refresh after removing and saving Bambu credentials (Manuel Weiser)
add functionality to remove Bambu credentials and update API handling (Manuel Weiser)
add rfid_bambu.html and update bambu connection handling (Manuel Weiser)
Fixed
handle Bambu connection state by introducing bambuDisabled flag (Manuel Weiser)
fe4d2d7 - Fix rfid.js-Failure with X1-Series, if you wanna send a Spool to AMS: - Uncaught TypeError: Cannot read properties of undefined (reading 'replace') at handleSpoolIn (rfid.js:493:67) at HTMLButtonElement.onclick ((Index):1:1) handleSpoolIn @ rfid.js:493 onclick @ (Index):1 (tugsi)
Changed
docs: update changelog and header for version v1.4.7 (Manuel Weiser)
docs: update platformio.ini for version v1.4.7 (Manuel Weiser)
Merge branch 'testing' (Manuel Weiser)
style: update remove button for Bambu credentials with red background (Manuel Weiser)
Merge pull request #28 from tugsi/main (ManuelW)
This commit is contained in:
2025-03-30 14:28:17 +02:00
parent 75fbd5ebc3
commit 0302725bc7
10 changed files with 274 additions and 30 deletions
+33 -2
View File
@@ -57,6 +57,31 @@
toggleOctoFields();
};
function removeBambuCredentials() {
fetch('/api/bambu?remove=true')
.then(response => response.json())
.then(data => {
if (data.success) {
document.getElementById('bambuIp').value = '';
document.getElementById('bambuSerial').value = '';
document.getElementById('bambuCode').value = '';
document.getElementById('autoSend').checked = false;
document.getElementById('autoSendTime').value = '';
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!';
// Reload with forced cache refresh after short delay
setTimeout(() => {
window.location.replace('/');
location.reload(true);
}, 1500);
} else {
document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.';
}
})
.catch(error => {
document.getElementById('bambuStatusMessage').innerText = 'Error while removing: ' + error.message;
});
}
function checkSpoolmanInstance() {
const url = document.getElementById('spoolmanUrl').value;
const spoolmanOctoEnabled = document.getElementById('spoolmanOctoEnabled').checked;
@@ -89,7 +114,12 @@
.then(data => {
if (data.healthy) {
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
} else {
// Reload with forced cache refresh after short delay
setTimeout(() => {
window.location.replace('/');
location.reload(true);
}, 1500);
} else {
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';
}
})
@@ -162,7 +192,8 @@
</div>
<button style="margin: 0;" onclick="saveBambuCredentials()">Save Bambu Credentials</button>
<p id="bambuStatusMessage"></p>
<button style="margin: 0; background-color: red;" onclick="removeBambuCredentials()">Remove Credentials</button>
<p id="bambuStatusMessage"></p>
</div>
</div>
</div>