Commit Graph

11 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
82d14f1fb1 Add delete script functionality
- Add deleteScript method to ScriptDownloaderService (both .ts and .js)
- Add deleteScript API endpoint to scripts router
- Add delete button to ScriptDetailModal with confirmation modal
- Use ConfirmationModal component instead of plain window.confirm
- Delete button only shows when script files exist locally
- Includes proper error handling and success/error messages
2025-11-07 13:10:37 +01:00
Michel Roegl-Brunner
4d12a51b05 fix: Auto-sync now only downloads truly new scripts
- Fixed isScriptDownloaded logic to check ALL script files before considering a script downloaded
- Modified auto-sync to filter and only process scripts that haven't been downloaded before
- Added proper logging to show how many new scripts were found vs total scripts
- Made isScriptDownloaded method public in TypeScript version

This ensures auto-sync only downloads scripts that are actually new,
not re-downloading existing scripts or processing unchanged content.
2025-10-24 12:33:00 +02:00
Michel Roegl-Brunner
e0bea6c6e0 feat: Add comprehensive auto-sync functionality
 New Features:
- Auto-sync service with configurable intervals (15min, 30min, 1hour, 6hours, 12hours, 24hours, custom cron)
- Automatic JSON file synchronization from GitHub repositories
- Auto-download new scripts when JSON files are updated
- Auto-update existing scripts when newer versions are available
- Apprise notification service integration for sync status updates
- Comprehensive error handling and logging

🔧 Technical Implementation:
- AutoSyncService: Core scheduling and execution logic
- GitHubJsonService: Handles JSON file synchronization from GitHub
- AppriseService: Sends notifications via multiple channels (Discord, Telegram, Email, Slack, etc.)
- ScriptDownloaderService: Manages automatic script downloads and updates
- Settings API: RESTful endpoints for auto-sync configuration
- UI Integration: Settings modal with auto-sync configuration options

📋 Configuration Options:
- Enable/disable auto-sync functionality
- Flexible scheduling (predefined intervals or custom cron expressions)
- Selective script processing (new downloads, updates, or both)
- Notification settings with multiple Apprise URL support
- Environment-based configuration with .env file persistence

🎯 Benefits:
- Keeps script repository automatically synchronized
- Reduces manual maintenance overhead
- Provides real-time notifications of sync status
- Supports multiple notification channels
- Configurable to match different deployment needs

This feature significantly enhances the automation capabilities of PVE Scripts Local,
making it a truly hands-off solution for script management.
2025-10-24 12:28:44 +02:00
Michel Roegl-Brunner
4f3a8574dc QoL features 2025-09-15 16:30:03 +02:00
Michel Roegl-Brunner
a5975a9b56 Fix CI/CD problems 2025-09-15 15:46:05 +02:00
Michel Roegl-Brunner
cb724f245b feat: Add repository status and update functionality
- Add ORIGINAL_REPO_URL environment variable for repository updates
- Create RepoStatusButton component with status display and update functionality
- Enhance GitManager with fullUpdate() method (git pull + npm install + build)
- Add fullUpdateRepo API endpoint for complete repository updates
- Display repository status with visual indicators (up-to-date, updates available, etc.)
- Show real-time progress during update process
- Add manual refresh capability for repository status
- Integrate repository status component into main page
2025-09-15 15:31:51 +02:00
Michel Roegl-Brunner
a053275d70 Remove debug console.log statements from WebSocket handler
- Removed verbose debug output from WebSocket connection logs
- Removed script execution debug messages
- Removed input handling debug logs
- Kept important error logging and server startup messages
- WebSocket functionality remains fully intact
2025-09-11 10:38:31 +02:00
Michel Roegl-Brunner
57293b9e59 Fix script execution issues and improve container creation
- Fixed syntax errors in build.func (duplicate export, unmatched quotes)
- Fixed color variable initialization by calling load_functions in core.func
- Replaced undefined function calls (post_to_api, post_update_to_api) with echo statements
- Fixed install script execution by copying scripts into container first
- Made create_lxc.sh executable
- Improved error handling and script sourcing
- Added missing core functions and tools
- Enhanced script downloader and local script management
2025-09-10 16:26:29 +02:00
Michel Roegl-Brunner
2e743490c9 feat: Remove executable check and add logo support for local scripts
- Remove executable check from ScriptsList component
- All scripts now show as runnable regardless of permissions
- Add logo support using JSON data from script metadata
- Update ScriptInfo interface to include logo and slug fields
- Modify getCtScripts to fetch logo from corresponding JSON files
- Update ScriptsList UI to display logos with fallback to file icons
- Fix TypeScript errors for proper type safety
2025-09-10 15:13:08 +02:00
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
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