New UI elements and fixes
Browse filesFiles changed (3)
25 unmodified lines2627282930313212 unmodified lines4546474849505152535455565725 unmodified lines});if (!items.length) {return <div className="text-sm text-emerald-200/80">No frames returned from the backend yet.</div>;}return (12 unmodified linesclassName="w-full h-full object-cover"/>) : (<div className="w-full h-full flex items-center justify-center text-xs text-gray-400">No image</div>)}<span className={`absolute top-1 left-1 px-2 py-0.5 rounded text-[10px] font-semibold ${item.badgeClass}`}>{item.label ? item.label.toUpperCase() : "N/A"}</span></div><div className="px-2 py-1.5 flex items-center justify-between text-[11px] text-emerald-100/80"><span>Frame {item.idx}</span>{item.hasFace ? (<span className="flex items-center gap-1">25 unmodified lines2627282930313212 unmodified lines4546474849505152535455565725 unmodified lines});if (!items.length) {return <div className="text-sm md:text-base text-emerald-200/80">No frames returned from the backend yet.</div>;}return (12 unmodified linesclassName="w-full h-full object-cover"/>) : (<div className="w-full h-full flex items-center justify-center text-xs md:text-sm text-gray-400">No image</div>)}<span className={`absolute top-1 left-1 px-2 py-0.5 rounded text-[11px] md:text-xs font-semibold ${item.badgeClass}`}>{item.label ? item.label.toUpperCase() : "N/A"}</span></div><div className="px-2 py-1.5 flex items-center justify-between text-[12px] md:text-sm text-emerald-100/80"><span>Frame {item.idx}</span>{item.hasFace ? (<span className="flex items-center gap-1">
114 unmodified lines11511611711811912012177 unmodified lines19920020120220320420513 unmodified lines21922022122222322422522622722822923023123223323423523623723823924012 unmodified lines253254255256257258259260261262263264265266114 unmodified linesonSubmit={onSubmit}className="w-full bg-slate-950 border border-emerald-900 rounded-2xl p-6 md:p-7 shadow-md shadow-emerald-900/40 flex flex-col gap-5 items-stretch text-center md:text-left h-full"><div className="flex items-center justify-between text-xs md:text-sm font-mono text-emerald-300/80"><span className="uppercase tracking-[0.2em] text-emerald-400/80">Upload & analyze</span>{result && (<span className="px-2 py-0.5 rounded-full bg-emerald-500/10 border border-emerald-600/40 text-[10px]">77 unmodified lines</form><div className="w-full bg-slate-950 border border-emerald-900 rounded-2xl p-6 md:p-7 shadow-md shadow-emerald-900/40 animate-fade-in-scale h-full flex flex-col gap-4 items-center text-center"><h2 className="text-xl md:text-2xl font-semibold mb-2">Final conclusion</h2>{result ? ((() => {const rawScore =13 unmodified linesreturn (<div className="flex flex-col items-center gap-4"><divclassName="relative h-32 w-32 md:h-36 md:w-36 rounded-full flex items-center justify-center"style={{background: `conic-gradient(${primaryColor} ${angle}deg, ${trackColor} ${angle}deg)`,}}><div className="h-24 w-24 md:h-28 md:w-28 rounded-full bg-slate-950 flex flex-col items-center justify-center border border-slate-700"><span className="text-[11px] md:text-xs font-mono text-emerald-200/80">{labelText}</span><span className="text-base md:text-lg font-semibold">{isNaN(percent) ? "-" : `${safePercent}%`}</span></div></div><div className="text-xs md:text-sm text-emerald-200/80 space-y-1"><div>REAL: {realProb.toFixed(3)}</div><div>FAKE: {fakeProb.toFixed(3)}</div><div className="text-emerald-300/80 text-[10px]">12 unmodified lines{result && (<section className="space-y-4 animate-fade-in-up"><div className="bg-slate-950 border border-emerald-900 rounded-xl p-5 shadow-md shadow-emerald-900/40 animate-fade-in-scale"><div className="flex items-center justify-between mb-2 text-xs font-mono text-emerald-300/80"><span className="uppercase tracking-[0.18em] text-emerald-400/80">Frames & predictions</span><span className="px-2 py-0.5 rounded-full bg-slate-900 border border-cyan-500/40 text-[10px] text-cyan-200 flex items-center gap-1"><span className="h-1.5 w-1.5 rounded-full bg-cyan-300" />{result.frames?.length || 0} frames</span></div><div className="border-t border-gray-800 pt-3 max-h-[480px] overflow-y-auto"><FrameGridframes={result.frames}predictions={result.predictions}114 unmodified lines11511611711811912012177 unmodified lines19920020120220320420513 unmodified lines21922022122222322422522622722822923023123223323423523623723823924012 unmodified lines253254255256257258259260261262263264265266114 unmodified linesonSubmit={onSubmit}className="w-full bg-slate-950 border border-emerald-900 rounded-2xl p-6 md:p-7 shadow-md shadow-emerald-900/40 flex flex-col gap-5 items-stretch text-center md:text-left h-full"><div className="flex items-center justify-between text-sm md:text-base font-mono text-emerald-300/80"><span className="uppercase tracking-[0.2em] text-emerald-400/80">Upload & analyze</span>{result && (<span className="px-2 py-0.5 rounded-full bg-emerald-500/10 border border-emerald-600/40 text-[10px]">77 unmodified lines</form><div className="w-full bg-slate-950 border border-emerald-900 rounded-2xl p-6 md:p-7 shadow-md shadow-emerald-900/40 animate-fade-in-scale h-full flex flex-col gap-4 items-center text-center"><h2 className="text-xl md:text-2xl font-semibold mb-1">Final conclusion</h2>{result ? ((() => {const rawScore =13 unmodified linesreturn (<div className="flex flex-col items-center gap-4"><divclassName="relative h-40 w-40 md:h-48 md:w-48 rounded-full flex items-center justify-center"style={{background: `conic-gradient(${primaryColor} ${angle}deg, ${trackColor} ${angle}deg)`,}}><div className="h-32 w-32 md:h-36 md:w-36 rounded-full bg-slate-950 flex flex-col items-center justify-center border border-slate-700"><span className="text-xs md:text-sm font-mono text-emerald-200/80">{labelText}</span><span className="text-lg md:text-2xl font-semibold">{isNaN(percent) ? "-" : `${safePercent}%`}</span></div></div><div className="text-sm md:text-[15px] text-emerald-200/80 space-y-1"><div>REAL: {realProb.toFixed(3)}</div><div>FAKE: {fakeProb.toFixed(3)}</div><div className="text-emerald-300/80 text-[10px]">12 unmodified lines{result && (<section className="space-y-4 animate-fade-in-up"><div className="bg-slate-950 border border-emerald-900 rounded-xl p-5 shadow-md shadow-emerald-900/40 animate-fade-in-scale"><div className="flex items-center justify-between mb-2 text-sm md:text-base font-mono text-emerald-300/80"><span className="uppercase tracking-[0.18em] text-emerald-400/80">Frames & predictions</span><span className="px-2 py-0.5 rounded-full bg-slate-900 border border-cyan-500/40 text-[11px] md:text-xs text-cyan-200 flex items-center gap-1"><span className="h-1.5 w-1.5 rounded-full bg-cyan-300" />{result.frames?.length || 0} frames</span></div><div className="border-t border-gray-800 pt-3 max-h-[480px] overflow-y-auto pr-2"><FrameGridframes={result.frames}predictions={result.predictions}
17 unmodified lines1819202122232425262717 unmodified lines}::-webkit-scrollbar-thumb {background: linear-gradient(to bottom, #22c55e, #06b6d4);border-radius: 9999px;}::-webkit-scrollbar-thumb:hover {background: linear-gradient(to bottom, #4ade80, #22d3ee);}17 unmodified lines181920212223242526272817 unmodified lines}::-webkit-scrollbar-thumb {background: #020617; /* almost black */border-radius: 9999px;border: 1px solid #0f172a; /* subtle slate border */}::-webkit-scrollbar-thumb:hover {background: #020617;}
frontend/components/FrameGrid.jsx+4-4
frontend/pages/analyze.jsx+10-10
frontend/styles/globals.css+3-2