commit c55207f372163e71d97a563aa2007995d2360e0b
parent 98de6d5efa712774e4f5d5c50e833a250ea5c951
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 5 Dec 2023 05:57:04 -0500
UI
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/pkg/web/handlers/poker.go b/pkg/web/handlers/poker.go
@@ -708,6 +708,8 @@ body {
#betBtn { width: 145px; height: 30px; }
#countdown { position: absolute; display: none; z-index: 100; }
#mainPot { position: absolute; top: 240px; left: 250px; }
+#yourCard1 { font-size: 22px; display: inline-block; margin-right: 15px; }
+#yourCard2 { font-size: 22px; display: inline-block; }
</style>`)
drawCountDownStyle := func(evt PokerWaitTurnEvent) {
@@ -836,11 +838,12 @@ Loop:
continue
} else if evt, ok := payload.(YourCardEvent); ok {
- if evt.Idx == 1 {
- send(`<style>#yourCard1:before { content: "` + evt.Name + `"; }</style>`)
- } else {
- send(`<style>#yourCard2:before { content: "` + evt.Name + `"; }</style>`)
+ color := "black"
+ if strings.Contains(evt.Name, "♥") ||
+ strings.Contains(evt.Name, "♦") {
+ color = "darkred"
}
+ send(`<style>#yourCard` + strconv.Itoa(evt.Idx) + `:before { content: "` + evt.Name + `"; color: ` + color + `; }</style>`)
c.Response().Flush()
continue