commit a3166719cf88ea5c2a486d8743715ed8625447b2
parent 993fc6a2326836f4af2d3e0fa695cad39ccc43b0
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 5 Dec 2023 19:44:51 -0500
cleanup
Diffstat:
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go
@@ -1025,23 +1025,21 @@ func PokerHandler(c echo.Context) error {
send(`<div id="countdown4" class="timer" style="--duration: ` + strconv.Itoa(MaxUserCountdown) + `;--size: 30;"><div class="mask"></div></div>`)
send(`<div id="countdown5" class="timer" style="--duration: ` + strconv.Itoa(MaxUserCountdown) + `;--size: 30;"><div class="mask"></div></div>`)
send(`<div id="countdown6" class="timer" style="--duration: ` + strconv.Itoa(MaxUserCountdown) + `;--size: 30;"><div class="mask"></div></div>`)
- if g.Ongoing != nil {
- send(drawCountDownStyle(g.Ongoing.WaitTurnEvent))
- }
send(`<div id="deckStr"></div>`)
- if g.Ongoing != nil && g.IsGameDone {
- send(`<style>#deckStr:before { content: "` + g.Ongoing.GetDeckStr() + `"; }</style>`)
- }
send(`<div id="deckHash"></div>`)
+
if g.Ongoing != nil {
+ send(drawCountDownStyle(g.Ongoing.WaitTurnEvent))
send(`<style>#deckHash:before { content: "` + g.Ongoing.GetDeckHash() + `"; }</style>`)
- }
- if g.Ongoing != nil {
+ if g.IsGameDone {
+ send(`<style>#deckStr:before { content: "` + g.Ongoing.GetDeckStr() + `"; }</style>`)
+ }
for _, payload := range g.Ongoing.Events {
send(getPokerEventHtml(payload, "0s"))
}
}
c.Response().Flush()
+
Loop:
for {
select {