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:
parent
668b56d9a2
commit
5476fe31a4
2 changed files with 6 additions and 1 deletions
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -136,6 +136,7 @@ body, html {
|
|||
|
||||
#connection-status-text, #ips, #automatic-discovery {
|
||||
margin-top: 20px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#connection-spinner {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue