|
39 | 39 | console.log('Mobile: pdf-lib loaded successfully', typeof PDFLib !== 'undefined'); |
40 | 40 | </script> |
41 | 41 | <script type="module" src="/main.js"></script> |
42 | | - <script src="/mobile-app.js"></script> |
| 42 | + <script src="/mobile-fixed.js"></script> |
43 | 43 |
|
44 | 44 | <style> |
45 | 45 | /* Modern Mobile Design System for CleanShare Pro */ |
@@ -678,24 +678,19 @@ <h2>CleanShare Pro</h2> |
678 | 678 | return; |
679 | 679 | } |
680 | 680 |
|
681 | | - // Try full React version with Phase 2.4 features |
682 | | - if (typeof React !== 'undefined' && typeof ReactDOM !== 'undefined' && window.MobileCleanSharePro) { |
683 | | - console.log('Mobile: Attempting full React-based initialization with Phase 2.4 features...'); |
| 681 | + // Try fixed mobile app with proper React component handling |
| 682 | + if (typeof React !== 'undefined' && typeof ReactDOM !== 'undefined' && window.FixedMobileApp) { |
| 683 | + console.log('Mobile: Attempting fixed mobile app...'); |
684 | 684 | try { |
685 | | - window.MobileCleanSharePro.initializeMobileApp().then(success => { |
686 | | - if (success) { |
687 | | - console.log('Mobile: Full React initialization successful'); |
688 | | - } else { |
689 | | - console.log('Mobile: Full React initialization returned false, using fallback'); |
690 | | - initializeFallback(); |
691 | | - } |
692 | | - }).catch(error => { |
693 | | - console.warn('Mobile: Full React initialization failed, falling back to vanilla:', error); |
694 | | - initializeFallback(); |
695 | | - }); |
696 | | - return; // Exit early, async initialization in progress |
| 685 | + const success = window.FixedMobileApp.initFixedMobileApp(); |
| 686 | + if (success) { |
| 687 | + console.log('Mobile: Fixed mobile app successful!'); |
| 688 | + return; // Success, exit early |
| 689 | + } else { |
| 690 | + console.log('Mobile: Fixed mobile app failed, using fallback'); |
| 691 | + } |
697 | 692 | } catch (error) { |
698 | | - console.warn('Mobile: Full React initialization threw error, falling back to vanilla:', error); |
| 693 | + console.warn('Mobile: Fixed mobile app threw error:', error); |
699 | 694 | } |
700 | 695 | } |
701 | 696 |
|
|
0 commit comments