Skip to content

Commit 78b5308

Browse files
committed
update phase 2.4 mobile
1 parent f2a8b50 commit 78b5308

3 files changed

Lines changed: 2127 additions & 183 deletions

File tree

apps/mobile/web/index.html

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
console.log('Mobile: pdf-lib loaded successfully', typeof PDFLib !== 'undefined');
4040
</script>
4141
<script type="module" src="/main.js"></script>
42-
<script src="/mobile-app.js"></script>
42+
<script src="/mobile-fixed.js"></script>
4343

4444
<style>
4545
/* Modern Mobile Design System for CleanShare Pro */
@@ -678,24 +678,19 @@ <h2>CleanShare Pro</h2>
678678
return;
679679
}
680680

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...');
684684
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+
}
697692
} 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);
699694
}
700695
}
701696

0 commit comments

Comments
 (0)