Feat: remove bot
This commit is contained in:
		| @@ -1,18 +1,31 @@ | ||||
| {{ define "addbot" }} | ||||
| {{$botName := ""}} | ||||
| <div> | ||||
|   {{$botName = .Room.FindBotByTeamRole "blue" "mime"}} | ||||
|   {{ if eq .Room.BlueTeam.Mime "" }} | ||||
|   <button hx-get="/add-bot?team=blue&role=mime" hx-target="#addbot" class="bg-blue-400 text-black px-4 py-2 rounded">Add Bot Mime</button> | ||||
|   {{ else if ne $botName "" }} | ||||
|   <button hx-get="/remove-bot?bot={{$botName}}" hx-target="#addbot" class="bg-blue-400 text-black px-4 py-2 rounded">Remove {{$botName}}</button> | ||||
|   {{ end }} | ||||
|   {{$botName = .Room.FindBotByTeamRole "red" "mime"}} | ||||
|   {{ if eq .Room.RedTeam.Mime "" }} | ||||
|   <button hx-get="/add-bot?team=red&role=mime" hx-target="#addbot" class="bg-red-400 text-black px-4 py-2 rounded">Add Bot Mime</button> | ||||
|   {{ else if ne $botName "" }} | ||||
|   <button hx-get="/remove-bot?bot={{$botName}}" hx-target="#addbot" class="bg-red-400 text-black px-4 py-2 rounded">Remove {{$botName}}</button> | ||||
|   {{ end }} | ||||
| </div> | ||||
|   {{$botName = .Room.FindBotByTeamRole "blue" "guesser"}} | ||||
| <div> | ||||
|   {{ if not .Room.BlueTeam.Guessers }} | ||||
|   <button hx-get="/add-bot?team=blue&role=guesser" hx-target="#addbot" class="bg-blue-300 text-black px-4 py-2 rounded">Add Bot Guesser</button> | ||||
|   {{ else if ne $botName "" }} | ||||
|   <button hx-get="/remove-bot?bot={{$botName}}" hx-target="#addbot" class="bg-blue-300 text-black px-4 py-2 rounded">Remove {{$botName}}</button> | ||||
|   {{ end }} | ||||
|   {{$botName = .Room.FindBotByTeamRole "red" "guesser"}} | ||||
|   {{ if not .Room.RedTeam.Guessers }} | ||||
|   <button hx-get="/add-bot?team=red&role=guesser" hx-target="#addbot" class="bg-red-300 text-black px-4 py-2 rounded">Add Bot Guesser</button> | ||||
|   {{ else if ne $botName "" }} | ||||
|   <button hx-get="/remove-bot?bot={{$botName}}" hx-target="#addbot" class="bg-red-300 text-black px-4 py-2 rounded">Remove {{$botName}}</button> | ||||
|   {{ end }} | ||||
| </div> | ||||
| {{end}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder