feat(ui): added complete js routing for create game

added complete js routing for each button. Removed every form and replaced buttons with divs
This commit is contained in:
LQ63
2025-11-11 16:46:06 +01:00
parent b508d2f428
commit 6d958cdd9e
7 changed files with 252 additions and 45 deletions

View File

@@ -75,12 +75,9 @@
<div class="row justify-content-center" id="card-slide">
@for(i <- player.currentHand().get.cards.indices) {
<div class="col-auto handcard" style="border-radius: 6px">
<form action="@(routes.IngameController.playCard(gamelobby.id))" method="post" class="m-0 p-0" style="border-radius: 6px">
<input type="hidden" name="cardId" value="@i" />
<button type="submit" class="btn btn-outline-light p-0 border-0 shadow-none" style="border-radius: 6px">
<div class="btn btn-outline-light p-0 border-0 shadow-none" data-card-id="@i" style="border-radius: 6px" onclick="handlePlayCard(this, '@gamelobby.id')">
@util.WebUIUtils.cardtoImage(player.currentHand().get.cards(i)) width="120px" style="border-radius: 6px"/>
</button>
</form>
</div>
</div>
}
</div>