dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit cb6f75518b6712c92f8e2929a4f8499a9723d4f1
parent b3831847f8556b098b580a1b09ecafc876913c50
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sat, 16 Dec 2023 02:45:04 -0500

UI

Diffstat:
Mpkg/web/handlers/poker/poker.go | 20+++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -1647,8 +1647,13 @@ func drawSeatsStyle(authUser *database.User, g *PokerGame) string { return html } -func drawErrorMsgEvent(evt ErrorMsgEvent) string { - return `<style>#errorMsg:before { content: "` + evt.Message + `"; }</style>` +func drawErrorMsgEvent(evt ErrorMsgEvent) (html string) { + if evt.Message != "" { + html += `<style>#errorMsg { display: block; } #errorMsg:before { content: "` + evt.Message + `"; }</style>` + } else { + html += `<style>#errorMsg { display: none; } #errorMsg:before { content: ""; }</style>` + } + return } func drawPlayerBetEvent(evt PlayerBetEvent) (html string) { @@ -1917,7 +1922,16 @@ body { #countdown6 { top: 404px; left: 59px; position: absolute; display: none; z-index: 100; } #mainPot { position: absolute; top: 220px; left: 250px; font-size: 20px; font-family: Arial,Helvetica,sans-serif; } #winner { position: absolute; top: 265px; left: 250px; } -#errorMsg { position: absolute; top: 550px; left: 250px; color: darkred; } +#errorMsg { position: absolute; top: 550px; left: 250px; + color: darkred; + font-size: 20px; + font-family: Arial,Helvetica,sans-serif; + background-color: #ffadad; + border: 1px solid #6e1616; + padding: 2px 3px; + border-radius: 3px; + display: none; +} #eventLogs { position: absolute; bottom: 5px; right: 5px; width: 300px; height: 200px; border: 1px solid black; background-color: #ccc; padding: 3px; } #dealerToken { top: 125px; left: 714px; width: 20px; height: 20px; background-color: #ccc; border: 1px solid #333; border-radius: 11px; position: absolute; } #dealerToken .inner { padding: 2px 4px; }