1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-08-24 00:02:50 +00:00

Receivers: Store connection state in main process

This commit is contained in:
Michael Hollister 2025-04-29 13:03:10 -05:00
parent 75f2f3dded
commit 5782fcc3ca
8 changed files with 32 additions and 16 deletions

View file

@ -15,12 +15,12 @@ let qrWidth = null;
window.addEventListener('resize', (event) => calculateQRCodeWidth());
connectionMonitor.setUiUpdateCallbacks({
onConnect: (connections: string[], connectionInfo: any) => {
onConnect: (connections: string[], initialUpdate: boolean = false) => {
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';
},
onDisconnect: (connections: string[], connectionInfo: any) => {
onDisconnect: (connections: string[]) => {
if (connections.length === 0) {
connectionStatusText.textContent = 'Waiting for a connection';
connectionStatusSpinner.style.display = 'inline-block';