This commit is contained in:
@@ -612,6 +612,7 @@ async function resumeSpotify(button) {
|
||||
const { target, account } = button.dataset;
|
||||
const who = button.querySelector('span').textContent;
|
||||
button.disabled = true;
|
||||
button.classList.add('loading');
|
||||
try {
|
||||
const data = await api('/api/spotify/resume', { target, account });
|
||||
toast(`Resuming ${who}'s Spotify on ${data.device}`, 'ok');
|
||||
@@ -625,6 +626,7 @@ async function resumeSpotify(button) {
|
||||
toast(error.message);
|
||||
} finally {
|
||||
button.disabled = false;
|
||||
button.classList.remove('loading');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,6 +635,7 @@ async function disconnectSpotify(button) {
|
||||
const who = button.querySelector('span').textContent;
|
||||
const room = rooms[target];
|
||||
button.disabled = true;
|
||||
button.classList.add('loading');
|
||||
try {
|
||||
const data = await api('/api/spotify/disconnect', { target, account });
|
||||
// The speaker not answering on the LAN is not a failure -- the room
|
||||
@@ -654,6 +657,7 @@ async function disconnectSpotify(button) {
|
||||
toast(error.message);
|
||||
} finally {
|
||||
button.disabled = false;
|
||||
button.classList.remove('loading');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user