feat: re-enable connection indicator for SSE status
All checks were successful
CI / Deploy / test (pull_request) Successful in 15s
CI / Deploy / lint (pull_request) Successful in 24s
CI / Deploy / deploy (pull_request) Has been skipped

Add ConnectionIndicator to Connect 4 game page (Snake already had it).
Both games now patch the indicator on initial connect and every 10s
heartbeat, giving users visual feedback that SSE is connected.
This commit is contained in:
Ryan Hamamura
2026-03-03 12:34:13 -10:00
parent de78ba6d39
commit cedcadfe3c
3 changed files with 19 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ templ GamePage(g *connect4.Game, myColor int, messages []chat.Message, chatCfg c
data-signals="{chatMsg: ''}"
data-init={ fmt.Sprintf("@get('/games/%s/events',{requestCancellation:'disabled'})", g.ID) }
>
@sharedcomponents.ConnectionIndicator(0)
@GameContent(g, myColor, messages, chatCfg)
</main>
}