mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-26 17:37:19 +00:00
modified: client/src/lib/platform.ts
This commit is contained in:
parent
cc1688110c
commit
33e0a26d35
2 changed files with 8 additions and 8 deletions
|
|
@ -46,9 +46,9 @@ export function detectPlatform(): PlatformType {
|
||||||
cachedPlatform = 'mobile';
|
cachedPlatform = 'mobile';
|
||||||
return cachedPlatform;
|
return cachedPlatform;
|
||||||
}
|
}
|
||||||
console.log('[Platform] Capacitor running on web platform - ignoring');
|
// Capacitor on web - ignore silently
|
||||||
} catch (e) {
|
} 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';
|
// return 'mobile';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Default to web, but do NOT cache it so we can re-check later when Capacitor might be ready
|
// Default to web - cache it to prevent infinite loops
|
||||||
console.log('[Platform] Detected: web (default - desktop browser or no native bridge)');
|
if (!cachedPlatform) {
|
||||||
return 'web';
|
console.log('[Platform] Detected: web (default - desktop browser or no native bridge)');
|
||||||
|
}
|
||||||
|
cachedPlatform = 'web';
|
||||||
|
return cachedPlatform;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getApiBaseUrl(): string {
|
function getApiBaseUrl(): string {
|
||||||
|
|
|
||||||
|
|
@ -1385,7 +1385,6 @@ export default function AeThexOS() {
|
||||||
|
|
||||||
// Native Android App Layout
|
// Native Android App Layout
|
||||||
if (layout.isMobile) {
|
if (layout.isMobile) {
|
||||||
console.log('📱 [OS] Rendering MOBILE layout (isMobile=true)', { layout });
|
|
||||||
const activeWindows = windows.filter(w => !w.minimized);
|
const activeWindows = windows.filter(w => !w.minimized);
|
||||||
const currentWindow = activeWindows[activeWindows.length - 1];
|
const currentWindow = activeWindows[activeWindows.length - 1];
|
||||||
|
|
||||||
|
|
@ -1633,8 +1632,6 @@ export default function AeThexOS() {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('🖥️ [OS] Rendering DESKTOP layout (isMobile=false)');
|
|
||||||
|
|
||||||
// Desktop/Web layout
|
// Desktop/Web layout
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue