commit 489cdcac8cfd1e33953db3462bf84edd7c4eb5ff
parent 65954df546348facef9b82f99532c61446d99bfa
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 26 Dec 2023 12:28:37 -0500
better anim
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go
@@ -1833,14 +1833,14 @@ func buildSeatsHtml(g *Game, authUser *database.User) (html string) {
}
func drawCashBonus(evt CashBonusEvent) (html string) {
- color := utils.Ternary(evt.IsGain, "#1ee91e", "red")
+ color := utils.Ternary(evt.IsGain, "#1ee91e", "orange")
dur := utils.Ternary(evt.IsGain, "5s", "2s")
fontSize := utils.Ternary(evt.IsGain, "25px", "18px")
html += `<style>`
html += fmt.Sprintf(`#seat%d .cash-bonus { animation: %s %s cubic-bezier(0.25, 0.1, 0.25, 1) forwards; color: %s; font-size: %s; }`,
evt.PlayerSeatIdx+1, utils.Ternary(evt.Animation, "cashBonusAnimation", "cashBonusAnimation1"), dur, color, fontSize)
html += fmt.Sprintf(`#seat%d .cash-bonus:before { content: "%s%s"; }`,
- evt.PlayerSeatIdx+1, utils.Ternary(evt.IsGain, "+", "-"), evt.Gain)
+ evt.PlayerSeatIdx+1, utils.Ternary(evt.IsGain, "+", ""), evt.Gain)
html += `</style>`
return
}