modified: client/src/lib/platform.ts

This commit is contained in:
MrPiglr 2026-02-12 20:55:32 -07:00
parent cc1688110c
commit 33e0a26d35
2 changed files with 8 additions and 8 deletions

View file

@ -46,9 +46,9 @@ export function detectPlatform(): PlatformType {
cachedPlatform = 'mobile';
return cachedPlatform;
}
console.log('[Platform] Capacitor running on web platform - ignoring');
// Capacitor on web - ignore silently
} catch (e) {
console.log('[Platform] Capacitor check failed - treating as web');
// Failed to check - ignore silently
}
}
@ -80,9 +80,12 @@ export function detectPlatform(): PlatformType {
// return 'mobile';
// }
// Default to web, but do NOT cache it so we can re-check later when Capacitor might be ready
console.log('[Platform] Detected: web (default - desktop browser or no native bridge)');
return 'web';
// Default to web - cache it to prevent infinite loops
if (!cachedPlatform) {
console.log('[Platform] Detected: web (default - desktop browser or no native bridge)');
}
cachedPlatform = 'web';
return cachedPlatform;
}
function getApiBaseUrl(): string {

View file

@ -1385,7 +1385,6 @@ export default function AeThexOS() {
// Native Android App Layout
if (layout.isMobile) {
console.log('📱 [OS] Rendering MOBILE layout (isMobile=true)', { layout });
const activeWindows = windows.filter(w => !w.minimized);
const currentWindow = activeWindows[activeWindows.length - 1];
@ -1633,8 +1632,6 @@ export default function AeThexOS() {
</div>
);
}
console.log('🖥️ [OS] Rendering DESKTOP layout (isMobile=false)');
// Desktop/Web layout
return (