mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-01 12:15:25 +00:00
Stats page should auto push stats when it reconnects to the websocket. Spectate page should auto pull when it reconnects to the websocket.
This commit is contained in:
@@ -76,6 +76,11 @@ export default class extends Controller {
|
||||
this.statusIndicatorTarget.classList.remove('alert-danger', 'alert-secondary', 'text-danger', 'text-dark')
|
||||
this.statusIndicatorTarget.classList.add('alert-success')
|
||||
}
|
||||
try {
|
||||
this.matchSubscription.perform('request_sync')
|
||||
} catch (e) {
|
||||
console.error('[Spectator AC] request_sync perform failed:', e)
|
||||
}
|
||||
},
|
||||
disconnected: () => {
|
||||
console.log(`[Spectator AC Callback] Disconnected: ${matchId}`)
|
||||
@@ -131,4 +136,4 @@ export default class extends Controller {
|
||||
this.finishedTarget.textContent = data.finished ? 'Yes' : 'No'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user