don't play animation if you disconnect a single client

This commit is contained in:
KingKDot
2026-04-13 20:02:58 -05:00
parent c995d17245
commit 41f8f087ce
2 changed files with 19 additions and 2 deletions
+6
View File
@@ -9,6 +9,7 @@ import {
sendCommand,
requestPreview,
requestThumbnail,
markManualDisconnect,
} from "./data.js";
import { initCountryPicker } from "./country-picker.js";
@@ -620,6 +621,7 @@ bulkDisconnectBtn?.addEventListener("click", async () => {
let success = 0;
for (const clientId of selectedClients) {
markManualDisconnect(clientId);
const ok = await sendCommand(clientId, "disconnect");
if (ok) success++;
}
@@ -976,6 +978,10 @@ menu.addEventListener("click", async (e) => {
return;
}
if (action === "disconnect") {
markManualDisconnect(contextCard);
}
const ok = await sendCommand(contextCard, action);
if (ok) {
setTimeout(() => loadWithOptions({ force: true }), 400);