Add run dashboard and encounter tracking interface
Run list at /runs shows all runs with status badges. Run dashboard at /runs/:id displays stats, active team, graveyard, and rule badges. Encounter tracking at /runs/:runId/encounters shows route list with status indicators, progress bar, filters, and a modal for logging or editing encounters with pokemon picker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
34
frontend/src/components/StatCard.tsx
Normal file
34
frontend/src/components/StatCard.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
interface StatCardProps {
|
||||
label: string
|
||||
value: number
|
||||
total?: number
|
||||
color: string
|
||||
}
|
||||
|
||||
const colorClasses: Record<string, string> = {
|
||||
blue: 'border-blue-500',
|
||||
green: 'border-green-500',
|
||||
red: 'border-red-500',
|
||||
purple: 'border-purple-500',
|
||||
amber: 'border-amber-500',
|
||||
gray: 'border-gray-500',
|
||||
}
|
||||
|
||||
export function StatCard({ label, value, total, color }: StatCardProps) {
|
||||
return (
|
||||
<div
|
||||
className={`bg-white dark:bg-gray-800 rounded-lg shadow p-4 border-l-4 ${colorClasses[color] ?? 'border-gray-500'}`}
|
||||
>
|
||||
<div className="text-2xl font-bold text-gray-900 dark:text-gray-100">
|
||||
{value}
|
||||
{total !== undefined && (
|
||||
<span className="text-sm font-normal text-gray-500 dark:text-gray-400">
|
||||
{' '}
|
||||
/ {total}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">{label}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user