Phase 5 Components (completing Pyrrhus's work): NEW FILES: - views/dashboard/UpdateBadge.tsx: Dashboard badge component - Shows 🟢 (up to date) or 🟠 (update available) next to server names - Global cache prevents multiple API calls on page load - Reads from local database, never calls external APIs directly - Fire (#FF6B35) and Frost (#4ECDC4) brand colors - console/CheckModpackUpdates.php: Laravel cron command - Run with: php artisan modpackchecker:check - Loops through servers with MODPACK_PLATFORM variable - Checks CurseForge, Modrinth, FTB, Technic APIs - Rate limited (2s sleep between checks) - Stores results in modpackchecker_servers table UPDATED FILES: - Controllers/ModpackAPIController.php: - Added getStatus() method for dashboard badge endpoint - Returns all user's servers' update status in single query - Added DB facade import - routes/client.php: - Added GET /extensions/modpackchecker/status route - build.sh: - Complete rewrite for Phase 5 - Handles both console widget AND dashboard badge - Auto-detects extension directory (dev vs extensions) - Copies CheckModpackUpdates.php to app/Console/Commands/ - Injects UpdateBadge into ServerRow.tsx - Clear status output and next-steps guide Architecture (Gemini-approved): CRON (hourly) → Database cache → Single API endpoint → React badge Dashboard badge is 'dumb' - only reads from cache, never external APIs Completing work started by Chronicler #62 (Pyrrhus). UpdateBadge.tsx was lost in Blueprint corruption - reconstructed from handoff notes and architecture documentation. Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
6.2 KiB
6.2 KiB