feat: cockpit

This commit is contained in:
OpenSquared
2026-07-21 17:43:03 +02:00
parent 78eda311f8
commit 894845c9f6

View File

@@ -437,15 +437,15 @@ export default function Dashboard() {
</ResponsiveContainer>
<div className="mt-1.5 pt-1.5 border-t border-slate-700/30 space-y-1">
{((watchlistQuotesData as any)?.items ?? []).map((it: any) => (
<div key={it.ticker} className="flex items-center justify-between text-[10px]">
<span className="text-slate-300 font-mono">{it.ticker}</span>
<div className="flex items-center gap-2">
<div key={it.ticker} className="flex items-center justify-between gap-1.5 text-[10px] whitespace-nowrap">
<span className="text-slate-300 font-mono shrink-0">{it.ticker}</span>
<div className="flex items-center gap-1.5 shrink-0">
<span className="text-slate-400 font-mono">{fmtPrice(it.price)}</span>
<span className={clsx('font-mono font-bold w-12 text-right', (it.change_pct ?? 0) >= 0 ? 'text-emerald-400' : 'text-red-400')}>
<span className={clsx('font-mono font-bold w-11 text-right shrink-0', (it.change_pct ?? 0) >= 0 ? 'text-emerald-400' : 'text-red-400')}>
{it.change_pct != null ? `${it.change_pct >= 0 ? '+' : ''}${it.change_pct.toFixed(2)}%` : '—'}
</span>
<span className="font-mono text-slate-500 w-16 text-right" title="20d realized volatility (annualized) · change vs D-1">
{it.volatility_pct != null ? `σ${it.volatility_pct.toFixed(1)}%` : '—'}
<span className="font-mono text-slate-500 w-16 text-right shrink-0" title="20d realized volatility (annualized) · change vs D-1">
{it.volatility_pct != null ? `${it.volatility_pct.toFixed(1)}%` : '—'}
{it.volatility_change_pct != null && Math.abs(it.volatility_change_pct) >= 0.1 && (
<span className={it.volatility_change_pct > 0 ? 'text-orange-400' : 'text-blue-400'}>
{' '}{it.volatility_change_pct >= 0 ? '+' : ''}{it.volatility_change_pct.toFixed(1)}