• Mahmoud Aglan's avatar
    fix: branding page — manual save button, images stored in Supabase Storage · 67c6136f
    Mahmoud Aglan authored
    1. REMOVED auto-save entirely
       - No more saving on every keystroke
       - Changes tracked as 'dirty' state
    
    2. NEW: Sticky bottom save bar
       - Shows 'No unsaved changes' (grey) / '️ Unsaved changes' (yellow)
       - '💾 Save All' button only active when changes exist
       - Success: '✓ Saved!' feedback
       - beforeunload warning if leaving with unsaved changes
    
    3. Image uploads now go to Supabase Storage
       - Uploaded to: profile-images/branding/{slot}.{ext}
       - Public URL stored in platform_assets table
       - Survives deploys (not local filesystem)
       - Also saved locally for immediate preview in admin
       - Asset URL returned by /api/branding.php GET endpoint
    
    4. Player app reads asset URLs from Supabase
       - theme.js fetches /api/branding.php → includes assets from platform_assets
       - Uploaded SVGs/PNGs render at exact specified size
       - object-fit:contain + image-rendering for no pixelation
    
    Flow:
    - Admin uploads logo.svg → Supabase Storage → URL in platform_assets
    - Admin changes gold color → marks dirty → clicks Save → Supabase platform_theme
    - Player loads app → /api/branding.php → gets colors + asset URLs → applies
    Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    67c6136f
Name
Last commit
Last update
..
branding.php Loading commit data...