Feat: start game

This commit is contained in:
Grail Finder
2025-05-09 11:54:01 +03:00
parent 2b4bf2ec29
commit 45761446e5
4 changed files with 57 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<p>Room created by {{.Room.CreatorName}};</p>
<p>Game is running: {{.Room.IsRunning}}</p>
<p>
{{if eq .State.Username .Room.CreatorName}}
{{if and (eq .State.Username .Room.CreatorName) (not .Room.IsRunning)}}
<button hx-get="/start-game" hx-target="#room" class="bg-amber-100 text-black px-4 py-2 rounded">Start Game</button>
{{end}}
</p>