littleshop/LittleShop/wwwroot
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
..
css Feature: Add elegant PWA loading screen 2025-10-02 16:39:47 +01:00
icons PWA-implementation 2025-09-01 04:49:05 +01:00
js Fix: Blazor Server loading screen now works correctly 2025-10-06 11:45:08 +01:00
lib Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
uploads/products Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
favicon.ico PWA-implementation 2025-09-01 04:49:05 +01:00
manifest.json PWA-implementation 2025-09-01 04:49:05 +01:00
service-worker.js Feature: Add elegant PWA loading screen 2025-10-02 16:39:47 +01:00
sw.js Product-enhancements-and-validation-fixes 2025-09-01 08:03:00 +01:00
test-blazor-assets.html Refactor payment verification to manual workflow and add comprehensive cleanup tools 2025-09-25 19:29:00 +01:00
test-blazor.html Refactor payment verification to manual workflow and add comprehensive cleanup tools 2025-09-25 19:29:00 +01:00