debug: simplify modal to show raw JSON
This commit is contained in:
@@ -280,40 +280,10 @@
|
|||||||
<h3>Trade History</h3>
|
<h3>Trade History</h3>
|
||||||
<button class="close-btn" onclick={() => showTradesModal = false}>×</button>
|
<button class="close-btn" onclick={() => showTradesModal = false}>×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="debug-info">selectedTrades.length = {selectedTrades.length}, loadingTrades = {loadingTrades}</div>
|
|
||||||
{#if loadingTrades}
|
{#if loadingTrades}
|
||||||
<p class="loading">Loading trades...</p>
|
<p>Loading trades...</p>
|
||||||
{:else if selectedTrades.length === 0}
|
|
||||||
<p class="empty-state">No trades recorded.</p>
|
|
||||||
{:else}
|
{:else}
|
||||||
<div class="trades-table-wrapper">
|
<pre>Debug: {JSON.stringify(selectedTrades)}</pre>
|
||||||
<table class="trades-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Type</th>
|
|
||||||
<th>Price</th>
|
|
||||||
<th>Amount</th>
|
|
||||||
<th>Exit Reason</th>
|
|
||||||
<th>Time</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{#each selectedTrades as trade}
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<span class="trade-type" class:buy={trade.type === 'buy'} class:sell={trade.type === 'sell'}>
|
|
||||||
{trade.type.toUpperCase()}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>${trade.price?.toFixed(6)}</td>
|
|
||||||
<td>${trade.amount?.toFixed(2)}</td>
|
|
||||||
<td>{trade.exit_reason || '-'}</td>
|
|
||||||
<td>{new Date(trade.timestamp * 1000).toLocaleString()}</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user