refactor: clear local storage and reset UI elements on room leave
All checks were successful
Build and Push Docker Image / docker (push) Successful in 8s
All checks were successful
Build and Push Docker Image / docker (push) Successful in 8s
This commit is contained in:
@@ -661,8 +661,8 @@
|
||||
"mbid": "4b5273c8-45f2-4bea-b73c-5128cd57faa8"
|
||||
},
|
||||
"Eric Carmen - Hungry Eyes (From Dirty Dancing Soundtrack).mp3": {
|
||||
"year": 2005,
|
||||
"date": "2005",
|
||||
"year": 1987,
|
||||
"date": "1987",
|
||||
"title": "Hungry Eyes (From \"Dirty Dancing\" Soundtrack)",
|
||||
"artist": "Eric Carmen",
|
||||
"mbid": "848ecccf-4fc4-4478-b70a-8e31286bfd84"
|
||||
@@ -710,8 +710,8 @@
|
||||
"mbid": "c9f0a90a-806c-4b60-bdca-1488eda61988"
|
||||
},
|
||||
"Fats Domino - Ain't That A Shame.mp3": {
|
||||
"year": 1988,
|
||||
"date": "1988",
|
||||
"year": 1955,
|
||||
"date": "1955",
|
||||
"title": "Ain't That A Shame",
|
||||
"artist": "Fats Domino",
|
||||
"mbid": "ffa16838-9137-42ec-964d-bf668d502593"
|
||||
@@ -1907,8 +1907,8 @@
|
||||
"mbid": "c02ff73a-59d3-409c-aa6a-288ad431f3d2"
|
||||
},
|
||||
"The Rolling Stones - Start Me Up (Remastered 2009).mp3": {
|
||||
"year": 2023,
|
||||
"date": "2023",
|
||||
"year": 1981,
|
||||
"date": "1981",
|
||||
"title": "Start Me Up (Remastered 2009)",
|
||||
"artist": "The Rolling Stones",
|
||||
"mbid": "a832bd7d-2f5a-48f3-960c-161903ddf126"
|
||||
|
||||
@@ -230,8 +230,14 @@ function wireUi() {
|
||||
});
|
||||
wire($leaveRoom, 'click', () => {
|
||||
sendMsg({ type: 'leave_room' });
|
||||
// Clear all local storage entries on leave
|
||||
try { localStorage.clear(); } catch {}
|
||||
stopAudioPlayback();
|
||||
state.room = null;
|
||||
// Reset visible name inputs/labels
|
||||
if ($nameLobby) { try { $nameLobby.value = ''; } catch {} }
|
||||
if ($nameDisplay) { $nameDisplay.textContent = ''; }
|
||||
if ($readyChk) { try { $readyChk.checked = false; } catch {} }
|
||||
$lobby.classList.remove('hidden');
|
||||
$room.classList.add('hidden');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user