ui: distinguish between missing fields and zero values in comparison view

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3fca108a637507c34f7579d6d52236136a6a6964
This commit is contained in:
raf 2026-01-22 23:58:51 +03:00
commit 80e0c9dc3d
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 129 additions and 38 deletions

View file

@ -3,7 +3,7 @@ import { StatsData } from '../utils/types';
import { BarChart2 } from 'lucide-solid';
interface FileUploadProps {
onFileLoad: (data: StatsData) => void;
onFileLoad: (data: StatsData, raw: Record<string, unknown>) => void;
onTextLoad: (text: string) => void;
showHelp: boolean;
onToggleHelp: () => void;
@ -22,7 +22,7 @@ export default function FileUpload(props: FileUploadProps) {
try {
const text = await file.text();
const json = JSON.parse(text);
props.onFileLoad(json);
props.onFileLoad(json, json);
} catch {
setError('Invalid JSON file');
}