feat: add bare slots frontend, remove bun start warnings

This commit is contained in:
Phan Huy Tran 2025-05-07 13:56:25 +02:00
commit bc56b498ee
8 changed files with 139 additions and 37 deletions

View file

@ -0,0 +1,52 @@
<app-navbar></app-navbar>
<div>
<h2>Payouts</h2>
@if (slotInfo(); as info) {
<table>
<tbody>
@for (item of info | keyvalue; track item.key) {
<tr>
<td>{{ item.key }}</td>
<td>{{ item.value }}</td>
</tr>
}
</tbody>
</table>
}
<div>
<div class="grid grid-cols-3 gap-1">
<div class="text-center">{{ slotResult().resultMatrix[0][0] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[0][1] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[0][2] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[1][0] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[1][1] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[1][2] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[2][0] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[2][1] }}</div>
<div class="text-center">{{ slotResult().resultMatrix[2][2] }}</div>
</div>
<div [ngClass]="slotResult().status === 'win' ? 'text-green-500' : 'text-red-500'">
<p>Game result: <strong>{{ slotResult().status | uppercase }}</strong></p>
<p>Amount: <strong>{{ slotResult().amount }}</strong></p>
</div>
<div>
<label for="betAmount">Bet Amount: </label>
<input
id="betAmount"
type="number"
[ngModel]="betAmount()"
(ngModelChange)="betAmount.set($event)"
step="0.01"
min="0.01"
/>
</div>
<button (click)="spin()">SPIN</button>
</div>
</div>