fix: update reload logic after removing and saving Bambu credentials for better cache handling

This commit is contained in:
Manuel Weiser 2025-03-27 19:13:57 +01:00
parent 56d7d8596c
commit 1484a6b0da

View File

@ -70,8 +70,8 @@
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!'; document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials removed!';
// Reload with forced cache refresh after short delay // Reload with forced cache refresh after short delay
setTimeout(() => { setTimeout(() => {
window.location.replace('/'); window.location.reload(true);
location.reload(true); window.location.href = '/';
}, 1500); }, 1500);
} else { } else {
document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.'; document.getElementById('bambuStatusMessage').innerText = 'Error while removing Bambu Credentials.';
@ -116,8 +116,8 @@
document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!'; document.getElementById('bambuStatusMessage').innerText = 'Bambu Credentials saved!';
// Reload with forced cache refresh after short delay // Reload with forced cache refresh after short delay
setTimeout(() => { setTimeout(() => {
window.location.replace('/'); window.location.reload(true);
location.reload(true); window.location.href = '/';
}, 1500); }, 1500);
} else { } else {
document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.'; document.getElementById('bambuStatusMessage').innerText = 'Error while saving Bambu Credentials.';