Feat: switch team; team model

This commit is contained in:
Grail Finder
2025-05-08 15:36:25 +03:00
parent 21948b23f4
commit 3cc2ecb93d
8 changed files with 122 additions and 60 deletions

View File

@ -1,19 +1,26 @@
{{define "room"}}
<div id="hello-user">
<p>Hello {{.State.Username}}</p>
<p>Hello {{.State.Username}};</p>
<p>
{{if eq .State.Team ""}}
join the team!
{{else}}
you're on the team {{.State.Team}}!
{{end}}
</p>
</div>
<hr />
<div class="flex justify-center">
<!-- Left Panel -->
{{template "teamlist" .Room.BlueGuessers}}
{{if eq .State.Team ""}}
{{template "teamlist" .Room.BlueTeam}}
{{if ne .State.Team "blue"}}
{{template "teampew" "blue"}}
{{end}}
<!-- Right Panel -->
{{if eq .State.Team ""}}
{{if ne .State.Team "red"}}
{{template "teampew" "red"}}
{{end}}
{{template "teamlist" .Room.RedGuessers}}
{{template "teamlist" .Room.RedTeam}}
</div>
<hr />
<div id="cardtable">