mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:07:20 +00:00
fix(webview): use index_nomodule.html to test if ESM is the blocker
This commit is contained in:
parent
bcc4926161
commit
537900cb71
2 changed files with 136 additions and 1 deletions
135
android/app/src/main/assets/public/index_nomodule.html
Normal file
135
android/app/src/main/assets/public/index_nomodule.html
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
|
||||
<script>
|
||||
// Global Error Handler to catch boot issues
|
||||
window.onerror = function(msg, url, line, col, error) {
|
||||
var root = document.getElementById('root') || document.body;
|
||||
// Only override if the app hasn't rendered anything yet
|
||||
if (!root.innerHTML || root.innerHTML === '') {
|
||||
root.innerHTML = '<div style="background:black;color:red;padding:20px;font-family:monospace;height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:999999;overflow:auto;">' +
|
||||
'<h1 style="color:red;font-size:24px;">FATAL BOOT ERROR</h1>' +
|
||||
'<p style="color:white;">' + msg + '</p>' +
|
||||
'<p style="color:gray;">' + url + ':' + line + '</p>' +
|
||||
'<pre style="color:#aaa;white-space:pre-wrap;">' + (error ? error.stack : 'No stack trace') + '</pre>' +
|
||||
'</div>';
|
||||
}
|
||||
console.error('FATAL:', msg, error);
|
||||
};
|
||||
console.log('AeThexOS Bootloader Initialized');
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Global Error Handler to catch boot issues
|
||||
window.onerror = function(msg, url, line, col, error) {
|
||||
var root = document.getElementById('root') || document.body;
|
||||
// Only override if the app hasn't rendered anything yet
|
||||
if (!root.innerHTML || root.innerHTML === '') {
|
||||
root.innerHTML = '<div style="background:black;color:red;padding:20px;font-family:monospace;height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:999999;overflow:auto;">' +
|
||||
'<h1 style="color:red;font-size:24px;">FATAL BOOT ERROR</h1>' +
|
||||
'<p style="color:white;">' + msg + '</p>' +
|
||||
'<p style="color:gray;">' + url + ':' + line + '</p>' +
|
||||
'<pre style="color:#aaa;white-space:pre-wrap;">' + (error ? error.stack : 'No stack trace') + '</pre>' +
|
||||
'</div>';
|
||||
}
|
||||
console.error('FATAL:', msg, error);
|
||||
};
|
||||
console.log('AeThexOS Bootloader Initialized');
|
||||
</script>
|
||||
|
||||
<!-- Samsung OneUI / Android Integration -->
|
||||
<meta name="theme-color" content="#0a0a0a" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
|
||||
<title>AeThex OS - Operating System for the Metaverse</title>
|
||||
<meta name="description" content="AeThex is the Operating System for the Metaverse. Join the network, earn credentials, and build the future with Axiom, Codex, and Aegis." />
|
||||
<meta name="keywords" content="metaverse, web3, architects, game development, digital ecosystem, AeThex, Aegis, Codex, Axiom" />
|
||||
<meta name="author" content="AeThex Network" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
|
||||
<meta property="og:title" content="AeThex OS - Operating System for the Metaverse" />
|
||||
<meta property="og:description" content="Join the AeThex Network. Earn credentials as a certified Metaverse Architect. Build the future with Axiom, Codex, and Aegis." />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://aethex.network" />
|
||||
<meta property="og:image" content="./opengraph.jpg" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:site_name" content="AeThex Network" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="@AeThexNetwork" />
|
||||
<meta name="twitter:creator" content="@AeThexNetwork" />
|
||||
<meta name="twitter:title" content="AeThex OS - Operating System for the Metaverse" />
|
||||
<meta name="twitter:description" content="Join the AeThex Network. Earn credentials as a certified Metaverse Architect. Build the future with Axiom, Codex, and Aegis." />
|
||||
<meta name="twitter:image" content="./opengraph.jpg" />
|
||||
|
||||
<link rel="icon" type="image/png" href="./favicon.png" />
|
||||
<link rel="apple-touch-icon" href="./favicon.png" />
|
||||
<link rel="manifest" href="./manifest.json" />
|
||||
<meta name="theme-color" content="#10b981" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="AeThex OS" />
|
||||
|
||||
<link rel="canonical" href="https://aethex.network" />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Orbitron:wght@400..900&family=Oxanium:wght@200..800&family=Share+Tech+Mono&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
/* Mobile safe area support */
|
||||
:root {
|
||||
--safe-area-inset-top: env(safe-area-inset-top, 0px);
|
||||
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
|
||||
--safe-area-inset-left: env(safe-area-inset-left, 0px);
|
||||
--safe-area-inset-right: env(safe-area-inset-right, 0px);
|
||||
}
|
||||
.safe-area-inset-top { padding-top: var(--safe-area-inset-top) !important; }
|
||||
.safe-area-inset-bottom { padding-bottom: var(--safe-area-inset-bottom) !important; }
|
||||
.safe-area-inset-left { padding-left: var(--safe-area-inset-left) !important; }
|
||||
.safe-area-inset-right { padding-right: var(--safe-area-inset-right) !important; }
|
||||
/* Disable pull-to-refresh on body */
|
||||
body {
|
||||
overscroll-behavior-y: contain;
|
||||
background-color: #FF00FF; /* MAGENTA DEBUG */
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
console.log('Index.html loaded - Setting Magenta background');
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.body.style.backgroundColor = '#FF00FF';
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
<script type="module" crossorigin src="./assets/index-DNAjObEt.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-W3l-3dJz.css">
|
||||
-->
|
||||
<script>
|
||||
document.body.style.backgroundColor = 'purple';
|
||||
document.body.innerHTML += '<h1 style="color:white;z-index:9999;position:fixed">NOMODULE LOADED (Purple)</h1>';
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<!-- Register service worker for PWA -->
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(registration => {
|
||||
console.log('[SW] Registered:', registration.scope);
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('[SW] Registration failed:', err);
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -70,6 +70,6 @@ public class MainActivity extends BridgeActivity {
|
|||
// SWITCH TO REAL APP
|
||||
// Using "file:///android_asset/public/" base path which matches the physical structure
|
||||
// AND ensuring we load index.html
|
||||
webView.loadUrl("file:///android_asset/public/index.html");
|
||||
webView.loadUrl("file:///android_asset/public/index_nomodule.html");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue