feat(results): replace video playback with detection image preview and map
This commit is contained in:
@@ -12,7 +12,7 @@ import type { DetectionResultLog } from '@/types';
|
||||
interface DetectionLogsProps {
|
||||
logs: DetectionResultLog[];
|
||||
activeLogId?: string;
|
||||
onSeek: (log: DetectionResultLog) => void;
|
||||
onSelect: (log: DetectionResultLog) => void;
|
||||
}
|
||||
|
||||
const formatVideoTime = (seconds: number) => {
|
||||
@@ -63,7 +63,7 @@ function DetectionLogThumbnail({
|
||||
);
|
||||
}
|
||||
|
||||
const DetectionLogs = ({ logs, activeLogId, onSeek }: DetectionLogsProps) => {
|
||||
const DetectionLogs = ({ logs, activeLogId, onSelect }: DetectionLogsProps) => {
|
||||
const activeLogRef = useRef<HTMLButtonElement | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -100,7 +100,7 @@ const DetectionLogs = ({ logs, activeLogId, onSeek }: DetectionLogsProps) => {
|
||||
key={`${log.id}-${log.frame.number}`}
|
||||
ref={isActive ? activeLogRef : null}
|
||||
type="button"
|
||||
onClick={() => onSeek(log)}
|
||||
onClick={() => onSelect(log)}
|
||||
className={cn(
|
||||
'w-full rounded-md border bg-card p-3 text-left transition-colors hover:border-primary',
|
||||
isActive && 'border-primary bg-primary/5',
|
||||
|
||||
Reference in New Issue
Block a user