From bfd7d3bfec9c8a69f752bd6857a213c8211450be Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Sat, 9 May 2026 01:48:16 -0700 Subject: [PATCH] refactor(ui): align history filters controls --- web/src/tabs/HistoryTab.tsx | 88 +++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/web/src/tabs/HistoryTab.tsx b/web/src/tabs/HistoryTab.tsx index 1f41b40..f550860 100644 --- a/web/src/tabs/HistoryTab.tsx +++ b/web/src/tabs/HistoryTab.tsx @@ -7,6 +7,7 @@ import { import { useCanonicalLifecycle } from '../hooks/useCanonicalLifecycle'; import { fetchTradeHistory } from '../lib/tradeHistoryApi'; import { fetchPositionsBootstrap } from '../lib/positionsApi'; +import { Button, Input, Select } from '../components/ui/Primitives'; interface TradeRecord { @@ -411,26 +412,24 @@ export const HistoryTab = ({ botState }: HistoryTabProps) => {
- + {profiles.map(p => ( - + ))}
@@ -504,49 +503,58 @@ export const HistoryTab = ({ botState }: HistoryTabProps) => { - + controlSize="sm" + variant="muted" + options={[ + { value: 'all', label: 'All Profiles' }, + ...profiles.map((profileOption) => ({ + value: profileOption.id, + label: profileOption.name, + })), + ]} + />
- setHistoryDateFrom(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-[var(--bl-focus-ring-muted)]" + controlSize="sm" + variant="muted" /> - setHistoryDateTo(e.target.value)} - className="bg-white/5 border border-white/10 rounded px-2 py-1 text-[10px] text-gray-200 focus:outline-none focus:ring-2 focus:ring-[var(--bl-focus-ring-muted)]" + controlSize="sm" + variant="muted" />
- - +
@@ -646,23 +654,27 @@ export const HistoryTab = ({ botState }: HistoryTabProps) => { -{Math.min(historyPage * HISTORY_PAGE_SIZE, sortedHistory.length)} of {sortedHistory.length}
- + Page {historyPage} / {historyTotalPages} - +