Skip to content

Commit

Permalink
show zero balances in rounds if there was a change
Browse files Browse the repository at this point in the history
  • Loading branch information
merklejerk committed Jun 19, 2024
1 parent 4dbb526 commit 57f6e25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/routes/(app)/match/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
.chart {
height: 10em;
margin: 2em 0;
margin: 2em 0 3em 0;
--player-1-color: rgb(87, 134, 17);
--player-2-color: rgb(212, 23, 23);
--player-3-color: rgb(32, 173, 220);
Expand Down Expand Up @@ -548,6 +548,7 @@
.rounds-count {
text-align: center;
margin-top: 1em;
}
}
</style>
Expand Down Expand Up @@ -670,10 +671,10 @@
holds:
</span>
{#each round.balances[playerIdx] as bal, assetIdx}
{#if bal > 0}
{#if bal > 0 || round.balanceDeltas[playerIdx][assetIdx] !== 0}
<div class="balance">
<span class="asset">{getAssetEmoji(assetIdx)}</span>
<span class="quantity">{formatAmount(bal)}</span>
<span class="quantity">{formatAmount(Math.max(0, bal))}</span>
{#if round.balanceDeltas[playerIdx][assetIdx] !== 0}
<span class="delta" class:decreased={round.balanceDeltas[playerIdx][assetIdx] < 0}>
({formatAmountDelta(round.balanceDeltas[playerIdx][assetIdx])})
Expand Down

0 comments on commit 57f6e25

Please sign in to comment.