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> |
||
|---|---|---|
| .. | ||
| blazor-integration.js | ||
| holographic-effects.js | ||
| modern-mobile.js | ||
| notifications.js | ||
| product-variants.js | ||
| pwa-fixed.js | ||
| pwa.js | ||