// GigLez - Capture Detail Modal
async function viewCaptureDetails(captureId) {
const modal = document.getElementById('detail-modal');
const modalBody = document.getElementById('modal-body-content');
// Show loading state
modal.classList.add('active');
modalBody.innerHTML = '
Loading...
';
try {
// Fetch capture details
const response = await fetch(`/api/v1/captures/${captureId}`);
if (!response.ok) {
throw new Error('Failed to fetch capture details');
}
const data = await response.json();
if (!data.success) {
throw new Error(data.message);
}
// Render detail view
modalBody.innerHTML = renderCaptureDetail(data.capture);
} catch (error) {
modalBody.innerHTML = `
Device Identification
Device Name
${capture.device_name}
Category
${capture.device_category}
Match Method
${capture.match_method || 'unknown'}
Confidence
${confidencePercent}%
${capture.device_description ? `
Description: ${capture.device_description}
` : ''}
`;
}
function renderNoDeviceSection() {
return `