Commit Graph

21 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
7258f7bcfd fix: Update local scripts tab to scan /scripts/ct directory
- Add getCtScripts() method to ScriptManager to scan ct subdirectory
- Add getCtScripts tRPC endpoint for local scripts tab
- Update ScriptsList component to use getCtScripts instead of getScripts
- Fix script path construction to use relative paths for terminal
- Local scripts tab now correctly shows scripts from /scripts/ct folder
2025-09-10 15:10:10 +02:00
Michel Roegl-Brunner
c739196dc2 fix: Use resolved absolute path for script execution
- Fix script execution by using resolvedPath instead of scriptPath
- This ensures the correct absolute path is used when spawning bash
- Previously was looking for scripts/ct/script.sh inside scripts/ directory
- Now correctly uses /root/Dev/PVESciptslocal/scripts/ct/script.sh
2025-09-10 15:06:40 +02:00
Michel Roegl-Brunner
c60e5e6a1d feat: Add Install button to script detail modal
- Add Install button that appears when script files are loaded
- Integrate with existing terminal component for script execution
- Pass correct script path to terminal (scripts/ct/script.sh)
- Close modal when installation starts
- Add proper TypeScript handling for union types
- Install button only shows when CT script is available locally
2025-09-10 15:04:02 +02:00
Michel Roegl-Brunner
17e0cea16b fix: Update script files status after successful loading
- Add refetchScriptFiles to checkScriptFiles query
- Call refetchScriptFiles after successful script loading
- This ensures the status indicators update immediately after loading
2025-09-10 15:00:41 +02:00
Michel Roegl-Brunner
2539957639 feat: Add Load Script functionality to script detail modal
- Create ScriptDownloaderService to download and modify script files from GitHub
- Add tRPC routes for loading scripts and checking file existence
- Add Load Script button to ScriptDetailModal with loading states
- Implement sed replacement for build.func source line in CT scripts
- Download CT scripts to scripts/ct/ and install scripts to scripts/install/
- Add visual indicators for script file availability
- Show success/error messages for script loading operations
2025-09-10 14:58:37 +02:00
Michel Roegl-Brunner
97753f7647 fix: Handle notes as objects with text and type properties
- Update Script type to handle notes as objects with text and type
- Add ScriptNote interface for structured note format
- Update ScriptDetailModal to render notes with proper styling based on type
- Add backward compatibility for string notes
- Fix React error 'Objects are not valid as a React child'
2025-09-10 14:54:07 +02:00
Michel Roegl-Brunner
d7d532069a fix: Make GitHub service optional and add debug logging
- Make GitHub service work without REPO_URL environment variable
- Add debug logging to ScriptsGrid to troubleshoot rendering issues
- Improve error handling for missing GitHub configuration
2025-09-10 14:50:16 +02:00
Michel Roegl-Brunner
78144d2641 fix: Add defensive programming and error handling to ScriptCard and ScriptsGrid
- Add null checks for script properties to prevent undefined errors
- Add proper key props to prevent React warnings
- Add validation for script objects before rendering
- Improve error handling for missing or malformed data
2025-09-10 14:49:19 +02:00
Michel Roegl-Brunner
bd1af66828 added json files 2025-09-10 14:47:48 +02:00
Michel Roegl-Brunner
43b4b30415 cleanup: Remove debug information from ScriptsGrid component 2025-09-10 14:44:38 +02:00
Michel Roegl-Brunner
18f6ebae18 feat: Switch to local JSON files as primary source with GitHub resync
- Create LocalScriptsService to read from scripts/json directory
- Update tRPC routes to use local files by default
- Implement resync functionality to download from GitHub and save locally
- Make GitHub optional - only needed for resyncing
- Update UI to reflect local-first approach
- Add proper error handling for missing local files
2025-09-10 14:44:02 +02:00
Michel Roegl-Brunner
4059b5a12f fix: Fix card click functionality and add environment variable validation
- Fix ScriptsGrid to properly handle card clicks by using selectedSlug state
- Add proper error handling for missing REPO_URL environment variable
- Add debug information for development mode
- Improve error messages to guide users on environment setup
2025-09-10 14:40:50 +02:00
Michel Roegl-Brunner
996fce1e11 feat: Add GitHub script list functionality with cards and modal
- Add JSON_FOLDER environment variable for GitHub repo JSON path
- Create TypeScript types for script JSON structure
- Implement GitHub API service to fetch scripts from repository
- Add tRPC routes for script management (getScriptCards, getAllScripts, getScriptBySlug, resyncScripts)
- Create ScriptCard component for displaying script information
- Create ScriptDetailModal for full script details view
- Create ScriptsGrid component with loading and error states
- Add ResyncButton component for refreshing scripts from upstream
- Update main page with tabbed interface (GitHub Scripts vs Local Scripts)
- Add proper error handling and loading states throughout
2025-09-10 14:37:37 +02:00
Michel Roegl-Brunner
69eec5f2ab Ammend Readme 2025-09-09 16:06:44 +02:00
Michel Roegl-Brunner
1ea37e5ce7 Ammend Readme 2025-09-09 16:06:17 +02:00
Michel Roegl-Brunner
76d702c999 Ammend .env.example 2025-09-09 16:03:49 +02:00
Michel Roegl-Brunner
030cd9ec9a Got the terminal working 2025-09-09 16:03:17 +02:00
Michel Roegl-Brunner
bd7a85789b Merge pull request #1 from michelroegl-brunner/PoC
Proof Of Concept
2025-09-09 14:25:52 +02:00
Rögl-Brunner Michel
6ee5c5c017 PoC 2025-09-09 14:24:36 +02:00
Rögl-Brunner Michel
cc47399e0c Remove Read Me content 2025-09-09 14:05:35 +02:00
Rögl-Brunner Michel
178eee664a initial commit 2025-09-09 14:04:07 +02:00