1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Receivers: Indicate if multiple devices are connected

This commit is contained in:
Michael Hollister 2025-04-21 08:45:10 -05:00
parent 668b56d9a2
commit 5476fe31a4
2 changed files with 6 additions and 1 deletions

View file

@ -33,6 +33,10 @@ window.targetAPI.onDisconnect((_event, value: any) => {
connectionStatusCheck.style.display = 'none';
toast("Device disconnected", ToastIcon.INFO);
}
else {
connectionStatusText.textContent = connections.length > 1 ? 'Multiple devices connected:\r\n Ready to cast' : 'Connected: Ready to cast';
toast("A device has disconnected", ToastIcon.INFO);
}
}
});
@ -43,7 +47,7 @@ if(window.targetAPI.getDeviceInfo()) {
function onConnect(value: any) {
console.log(`Device connected: ${JSON.stringify(value)}`);
connectionStatusText.textContent = 'Connected: Ready to cast';
connectionStatusText.textContent = connections.length > 1 ? 'Multiple devices connected:\r\n Ready to cast' : 'Connected: Ready to cast';
connectionStatusSpinner.style.display = 'none';
connectionStatusCheck.style.display = 'inline-block';
}

View file

@ -136,6 +136,7 @@ body, html {
#connection-status-text, #ips, #automatic-discovery {
margin-top: 20px;
white-space: pre;
}
#connection-spinner {