Fix script card click issues and missing Install button

- Fix type signature mismatch in handleCardClick functions
  - Updated ScriptsGrid.tsx and DownloadedScriptsTab.tsx to accept ScriptCardType instead of { slug: string }
  - This resolves the modal not opening when clicking script cards

- Fix server-side import issues
  - Updated autoSyncService.js to import from githubJsonService.ts instead of .js
  - Fixed path aliases in githubJsonService.ts to use relative imports
  - Updated scripts.ts to import from TypeScript service files directly

- Fix missing Install button
  - Resolved scriptDownloaderService.checkScriptExists method not being available
  - Install button now appears when script files exist locally

- Remove debug logging
  - Cleaned up temporary console.log statements and debug UI elements

All script card interactions now work properly:
- Cards open detail modal when clicked
- Install button appears when appropriate
- Server-side API calls work correctly
This commit is contained in:
Michel Roegl-Brunner
2025-10-24 21:22:46 +02:00
parent 74dd29b87b
commit 2c3fdf5544
5 changed files with 21 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import { writeFile, mkdir } from 'fs/promises';
import { join } from 'path';
import { env } from '~/env.js';
import type { Script, ScriptCard, GitHubFile } from '~/types/script';
import { env } from '../../env.js';
import type { Script, ScriptCard, GitHubFile } from '../../types/script';
export class GitHubJsonService {
private baseUrl: string | null = null;