commit 25c90bc8a0f0c43d77b23a9fcc172380a5baf5f5
parent d4779434018d5a4e8b95692793236ce86e977d4a
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 19 Dec 2023 02:22:16 -0500
cleanup
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -1786,24 +1786,24 @@ func drawSeatsStyle(authUser *database.User, g *PokerGame) string {
for i, p := range *players {
idxStr := itoa(i + 1)
display := utils.Ternary(p != nil || seated, "none", "block")
- html += `.takeSeat` + idxStr + ` { display: ` + display + `; }`
+ html += fmt.Sprintf(`.takeSeat%s { display: %s; }`, idxStr, display)
if p != nil {
pUserID := p.userID
pUsername := p.username
if pUserID == authUser.ID {
- html += `#seat` + idxStr + ` { border: 2px solid #0d1b8f; }`
+ html += fmt.Sprintf(`#seat%s { border: 2px solid #0d1b8f; }`, idxStr)
}
- html += `#seat` + idxStr + ` .inner:before { content: "` + pUsername.String() + `"; }`
- html += `#seat` + idxStr + `_cash:before { content: "` + itoa2(p.getCash()) + `"; }`
+ html += fmt.Sprintf(`#seat%s .inner:before { content: "%s"; }`, idxStr, pUsername.String())
+ html += fmt.Sprintf(`#seat%s_cash:before { content: "%s"; }`, idxStr, itoa2(p.getCash()))
if ongoing != nil {
if op := ongoing.getPlayer(pUserID); op != nil && op.getBet() > 0 {
- html += `#seat` + idxStr + `Pot:before { content: "` + itoa2(op.getBet()) + `"; }`
+ html += fmt.Sprintf(`#seat%sPot:before { content: "%s"; }`, idxStr, itoa2(op.getBet()))
}
}
} else {
- html += `#seat` + idxStr + ` { border: 1px solid #333; }`
- html += `#seat` + idxStr + ` .inner:before { content: ""; }`
- html += `#seat` + idxStr + `_cash:before { content: ""; }`
+ html += fmt.Sprintf(`#seat%s { border: 1px solid #333; }`, idxStr)
+ html += fmt.Sprintf(`#seat%s .inner:before { content: ""; }`, idxStr)
+ html += fmt.Sprintf(`#seat%s_cash:before { content: ""; }`, idxStr)
}
}
})