feat: cockpit
This commit is contained in:
@@ -28,7 +28,7 @@ export default function TradeRankList({ trades, mode, title, linkTo, toggle, tic
|
||||
</div>
|
||||
</div>
|
||||
{sorted.length > 0 ? (
|
||||
<div className="space-y-1.5 mt-1 max-h-[135px] overflow-y-auto pr-0.5">
|
||||
<div className="space-y-1.5 mt-1 max-h-[190px] overflow-y-auto pr-0.5">
|
||||
{sorted.map((t: any, i: number) => {
|
||||
const pnl: number | null = t.pnl_pct ?? null
|
||||
const isBear = t.strategy?.toLowerCase().includes('put') || t.strategy?.toLowerCase().includes('bear')
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
useInstrumentsWatchlist, useInstrumentsWatchlistQuotes, useWatchlistHistory, useQuickAddInstrument, useSaxoIvWatchlist, useLatestCycleReport,
|
||||
useWaveletWatchlistSignals,
|
||||
} from '../hooks/useApi'
|
||||
import { Clock, Globe, ShieldAlert, ArrowUpRight, Newspaper, Waves, Link2 } from 'lucide-react'
|
||||
import { Clock, Globe, ArrowUpRight, Newspaper, Waves, Link2 } from 'lucide-react'
|
||||
import { Link, useNavigate } from 'react-router-dom'
|
||||
import clsx from 'clsx'
|
||||
import type { Quote } from '../types'
|
||||
@@ -321,22 +321,6 @@ export default function Dashboard() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Risk concentration banner */}
|
||||
{(riskDashboard as any)?.concentration_alerts?.length > 0 && (
|
||||
<div className="space-y-1.5">
|
||||
{((riskDashboard as any).concentration_alerts as any[]).slice(0, 2).map((alert: any, i: number) => (
|
||||
<div key={i} className={clsx('flex items-center gap-2 text-xs px-3 py-2 rounded border', {
|
||||
'bg-red-900/20 border-red-700/30 text-red-300': alert.level === 'high',
|
||||
'bg-amber-900/20 border-amber-700/30 text-amber-300': alert.level === 'warning',
|
||||
})}>
|
||||
<ShieldAlert className="w-3 h-3 shrink-0" />
|
||||
{alert.message}
|
||||
<a href="/risk" className="ml-auto text-slate-500 hover:text-slate-300 underline">Risk Dashboard →</a>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Top row — height capped to Watchlist Radar's natural size (the only card driven by user config) */}
|
||||
<div className="grid grid-cols-4 gap-4 items-start">
|
||||
{/* Geo Risk */}
|
||||
@@ -1056,7 +1040,7 @@ export default function Dashboard() {
|
||||
<ArrowUpRight className="w-3 h-3 text-slate-600" />
|
||||
</Link>
|
||||
{signals.length > 0 ? (
|
||||
<div className="space-y-1.5 mt-1 max-h-[135px] overflow-y-auto pr-0.5">
|
||||
<div className="space-y-1.5 mt-1 max-h-[190px] overflow-y-auto pr-0.5">
|
||||
{signals.map((s: any, i: number) => (
|
||||
<div
|
||||
key={i}
|
||||
|
||||
Reference in New Issue
Block a user