fix: put guard around startup chime

This commit is contained in:
KernelDeimos
2025-03-29 14:57:45 -04:00
parent 7c1fb4c3bf
commit a276a82e44
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -458,8 +458,9 @@ async function UIWindowLogin(options){
await p;
window.update_auth_data(data.token, data.user);
if(options.reload_on_success){
sessionStorage.setItem('playChimeNextUpdate', 'yes');
window.onbeforeunload = null;
console.log('About to redirect, checking URL parameters:', window.location.search);
// Replace with a clean URL to prevent password leakage
+2 -1
View File
@@ -438,7 +438,8 @@ window.update_auth_data = async (auth_token, user)=>{
localStorage.setItem('auth_token', auth_token);
// Play startup chime if enabled
if (typeof play_startup_chime === 'function') {
if ( sessionStorage.getItem('playChimeNextUpdate') === 'yes' ) {
sessionStorage.setItem('playChimeNextUpdate', 'no');
play_startup_chime();
}