diff --git a/package.json b/package.json index 1e27fa3..107b52e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "astro build", "preview": "astro preview", "astro": "astro", - "check:health": "curl -f http://localhost:3000/health || exit 1" + "check:health": "curl -f http://localhost:4321/health || exit 1" }, "dependencies": { "@astrojs/node": "^9.3.0", diff --git a/src/components/ToolMatrix.astro b/src/components/ToolMatrix.astro index 44986f3..be7b43a 100644 --- a/src/components/ToolMatrix.astro +++ b/src/components/ToolMatrix.astro @@ -231,40 +231,6 @@ domains.forEach((domain: any) => { // Make functions globally available window.toggleDomainAgnosticSection = toggleDomainAgnosticSection; - // Helper function to create compact tool cards - function createCollaborationToolCardCompact(tool) { - const hasValidProjectUrl = tool.projectUrl !== undefined && - tool.projectUrl !== null && - tool.projectUrl !== "" && - tool.projectUrl.trim() !== ""; - - const cardDiv = document.createElement('div'); - const cardClass = `collaboration-tool-compact ${hasValidProjectUrl ? 'hosted' : tool.license !== 'Proprietary' ? 'oss' : ''}`; - cardDiv.className = cardClass; - cardDiv.onclick = () => window.showToolDetails(tool.name); - - cardDiv.innerHTML = ` -
-

${tool.name}

-
- ${hasValidProjectUrl ? 'Self-Hosted' : ''} - ${tool.license !== 'Proprietary' ? 'OSS' : ''} - ${tool.knowledgebase === true ? 'Infos 📖' : ''} -
-
-

- ${tool.description} -

-
- ${(tool.platforms || []).join(', ')} - • - ${tool.skillLevel} -
- `; - - return cardDiv; - } - // Tool details functions (unchanged) window.showToolDetails = function(toolName) { const tool = toolsData.find(t => t.name === toolName); diff --git a/src/env.d.ts b/src/env.d.ts index 090f178..44afb34 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -13,11 +13,6 @@ declare global { hideToolDetails: () => void; } - // Custom event types - interface WindowEventMap { - 'toolsFiltered': CustomEvent; - 'viewChanged': CustomEvent; - } } // Also declare the modules that might not be recognized diff --git a/src/pages/api/auth/logout.ts b/src/pages/api/auth/logout.ts deleted file mode 100644 index 689de14..0000000 --- a/src/pages/api/auth/logout.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { APIRoute } from 'astro'; -import { getSessionFromRequest, verifySession } from '../../../utils/auth.js'; - -export const prerender = false; - -export const GET: APIRoute = async ({ request }) => { - try { - const sessionToken = getSessionFromRequest(request); - - if (!sessionToken) { - return new Response(JSON.stringify({ - authenticated: false - }), { - status: 200, - headers: { 'Content-Type': 'application/json' } - }); - } - - const session = await verifySession(sessionToken); - - return new Response(JSON.stringify({ - authenticated: session !== null, - expires: session?.exp ? new Date(session.exp * 1000).toISOString() : null - }), { - status: 200, - headers: { 'Content-Type': 'application/json' } - }); - - } catch (error) { - return new Response(JSON.stringify({ - authenticated: false, - error: 'Session verification failed' - }), { - status: 200, - headers: { 'Content-Type': 'application/json' } - }); - } -}; \ No newline at end of file diff --git a/src/scripts/theme.js b/src/scripts/theme.js index 6c23a35..b7184cd 100644 --- a/src/scripts/theme.js +++ b/src/scripts/theme.js @@ -53,10 +53,7 @@ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () } }); -// Initialize immediately when script loads -initTheme(); - -// Also initialize when DOM is ready (for safety) +// Initialize when DOM is ready (for safety) document.addEventListener('DOMContentLoaded', initTheme); // Export functions for use in Astro components