littleshop/LittleShop/wwwroot/js
SysAdmin db2443c7ac Fix: Blazor Server loading screen now works correctly
Problem:
- Loading screen was getting stuck and not hiding properly
- Conflicting logic between pwa.js and inline scripts
- Blazor Server lifecycle not properly integrated with loading screen

Solution (Meziantou-inspired approach for Blazor Server):
1. **blazor-integration.js** - Now manages loading screen lifecycle:
   - Shows loading screen only on first load (sessionStorage check)
   - Hides screen when Blazor.start() promise resolves (SignalR connected)
   - Added reconnection UI for Blazor Server disconnections
   - Proper error handling if Blazor fails to start

2. **_Layout.cshtml** - Simplified loading screen management:
   - Removed inline script that was conflicting
   - Moved blazor-integration.js before pwa.js (load order critical)
   - Loading screen now controlled by Blazor lifecycle

3. **pwa.js** - Removed conflicting logic:
   - Removed hideLoadingScreen() method
   - Removed 5-second fallback timeout
   - PWA initialization no longer interferes with Blazor loading

Key Differences from WebAssembly Approach:
- WASM: Downloads .NET runtime + shows download progress
- Server: Establishes SignalR connection + shows spinner
- Loading screen hides when SignalR connection is ready

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 11:45:08 +01:00
..
blazor-integration.js Fix: Blazor Server loading screen now works correctly 2025-10-06 11:45:08 +01:00
holographic-effects.js PWA-implementation 2025-09-01 04:49:05 +01:00
modern-mobile.js Configure push notifications for internal-only access 2025-09-30 21:15:42 +01:00
notifications.js Fix: Prevent notification prompt from reappearing after timeout 2025-10-02 14:44:10 +01:00
product-variants.js Fix: Add Price field to variant collection editor 2025-10-03 18:45:13 +01:00
pwa-fixed.js CI/CD: Add GitLab CI/CD pipeline for Hostinger deployment 2025-10-01 13:10:48 +01:00
pwa.js Fix: Blazor Server loading screen now works correctly 2025-10-06 11:45:08 +01:00