main #11

Merged
mstoeck3 merged 66 commits from main into forensic-ai 2025-08-11 12:02:56 +00:00
5 changed files with 187890 additions and 187834 deletions
Showing only changes of commit df6bda30b1 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -771,18 +771,35 @@ const sortedTags = Object.entries(tagFrequency)
btn.addEventListener('click', () => {
const view = btn.getAttribute('data-view');
// Update active states
elements.viewToggles.forEach(b => {
b.classList.toggle('active', b.getAttribute('data-view') === view);
});
window.dispatchEvent(new CustomEvent('viewChanged', { detail: view }));
if (view === 'hosted') {
const hosted = window.toolsData.filter(tool => isToolHosted(tool));
window.dispatchEvent(new CustomEvent('toolsFiltered', { detail: hosted }));
// Call the global switchToView function
if (window.switchToView) {
window.switchToView(view);
} else {
console.error('switchToView function not available');
}
// Dispatch view changed event
window.dispatchEvent(new CustomEvent('viewChanged', {
detail: view,
triggeredByButton: true
}));
// Handle filtering after view switch
setTimeout(() => {
if (view === 'matrix') {
// Ensure matrix gets populated by triggering filter
filterTools();
} else if (view === 'grid') {
// Standard filtering for grid view
filterTools();
}
// AI view doesn't need filtering from here
}, 100); // Slightly longer delay to ensure view switch completes
});
});

View File

@ -772,19 +772,24 @@ domains.forEach((domain: any) => {
window.addEventListener('viewChanged', (event) => {
const view = event.detail;
if (view === 'matrix') {
setTimeout(updateMatrixHighlighting, 100);
setTimeout(() => {
if (window.filterTools && typeof window.filterTools === 'function') {
window.filterTools();
} else {
const allTools = window.toolsData || [];
window.dispatchEvent(new CustomEvent('toolsFiltered', {
detail: {
tools: allTools,
semanticSearch: false
}
}));
}
}, 100);
}
});
window.addEventListener('toolsFiltered', (event) => {
const currentView = document.querySelector('.view-toggle.active')?.getAttribute('data-view');
if (currentView === 'matrix') {
setTimeout(updateMatrixHighlighting, 50);
}
});
window.addEventListener('toolsFiltered', (event) => {
const filtered = event.detail;
const { tools: filtered, semanticSearch } = event.detail; // ✅ Correct destructuring
const currentView = document.querySelector('.view-toggle.active')?.getAttribute('data-view');
if (currentView === 'matrix') {
@ -827,6 +832,7 @@ domains.forEach((domain: any) => {
hasValidProjectUrl ? 'tool-chip-hosted' :
tool.license !== 'Proprietary' ? 'tool-chip-oss' : '';
chip.className = `tool-chip ${chipClass}`;
chip.setAttribute('data-tool-name', tool.name);
chip.setAttribute('title', `${tool.name}${tool.knowledgebase === true ? ' (KB verfügbar)' : ''}`);
chip.innerHTML = `${tool.name}${tool.knowledgebase === true ? '<span style="margin-left: 0.25rem; font-size: 0.6875rem;">📖</span>' : ''}`;
chip.onclick = () => window.showToolDetails(tool.name);

View File

@ -1157,6 +1157,8 @@ tools:
- nethunter
- custom-builds
- rolling-release
domain-agnostic-software:
- specific-os
related_software:
- Parrot Security OS
- SIFT Workstation
@ -2433,6 +2435,8 @@ tools:
- mobile-forensics
platforms:
- OS
domain-agnostic-software:
- specific-os
tags:
- gui
- cli
@ -2476,6 +2480,8 @@ tools:
- mobile-forensics
platforms:
- OS
domain-agnostic-software:
- specific-os
tags:
- gui
- write-blocker
@ -2536,6 +2542,8 @@ tools:
icon: 🦜
license: GPL-3.0
accessType: download
domain-agnostic-software:
- specific-os
- name: LibreOffice
type: software
description: >-
@ -3081,6 +3089,8 @@ tools:
skillLevel: beginner
domains:
- collaboration-general
domain-agnostic-software:
- collaboration-general
phases:
- reporting
platforms:
@ -3783,6 +3793,8 @@ tools:
skillLevel: beginner
domains:
- collaboration-general
domain-agnostic-software:
- collaboration-general
phases:
- reporting
platforms:
@ -4490,6 +4502,8 @@ tools:
- analysis
platforms:
- Linux
domain-agnostic-software:
- specific-os
tags:
- live-distro
- imaging
@ -7214,4 +7228,3 @@ scenarios:
- id: scenario:windows-registry
icon: 📜
friendly_name: Windows Registry analysieren
skill_levels: {}

View File

@ -356,6 +356,8 @@ if (aiAuthRequired) {
}
function switchToView(view) {
console.log('[VIEW] Switching to view:', view);
const toolsGrid = document.getElementById('tools-grid');
const matrixContainer = document.getElementById('matrix-container');
const aiInterface = document.getElementById('ai-interface');
@ -365,8 +367,12 @@ if (aiAuthRequired) {
const methodologySection = document.getElementById('methodology-section');
const targetedSection = document.getElementById('targeted-section');
// Hide all views
if (toolsGrid) toolsGrid.style.display = 'none';
if (matrixContainer) matrixContainer.style.display = 'none';
if (matrixContainer) {
matrixContainer.style.display = 'none';
matrixContainer.classList.add('hidden');
}
if (aiInterface) aiInterface.style.display = 'none';
if (noResults) noResults.style.display = 'none';
@ -375,14 +381,22 @@ if (aiAuthRequired) {
switch (view) {
case 'grid':
console.log('[VIEW] Showing grid view');
if (toolsGrid) toolsGrid.style.display = 'block';
if (filtersSection) filtersSection.style.display = 'block';
break;
case 'matrix':
if (matrixContainer) matrixContainer.style.display = 'block';
console.log('[VIEW] Showing matrix view');
if (matrixContainer) {
matrixContainer.style.display = 'block';
matrixContainer.classList.remove('hidden');
}
if (filtersSection) filtersSection.style.display = 'block';
break;
case 'ai':
console.log('[VIEW] Showing AI view');
if (aiAuthRequired && !aiAuthenticated) {
console.log('[AUTH] AI access denied, redirecting to login');
const currentUrl = encodeURIComponent(window.location.href);
@ -405,8 +419,12 @@ if (aiAuthRequired) {
});
}
break;
default:
console.warn('[VIEW] Unknown view:', view);
}
// Restore all filter sections for non-AI views
if (view !== 'ai' && filtersSection) {
const filterSections = filtersSection.querySelectorAll('.filter-section');
filterSections.forEach(section => {
@ -415,7 +433,6 @@ if (aiAuthRequired) {
}
}
// Rest of the existing code remains the same...
window.navigateToGrid = function(toolName) {
console.log('Navigating to grid for tool:', toolName);
@ -655,10 +672,13 @@ if (aiAuthRequired) {
window.addEventListener('viewChanged', (event) => {
const view = event.detail;
if (!event.triggeredByButton) {
switchToView(view);
}
});
window.switchToAIView = () => switchToView('ai');
window.switchToView = switchToView;
handleSharedURL();
});