Spaces:
Running
Running
Update index.html
Browse files- index.html +6 -26
index.html
CHANGED
@@ -16,17 +16,8 @@
|
|
16 |
<div id="debug-log"></div>
|
17 |
</div>
|
18 |
|
19 |
-
<div id="notification" class="notification hidden">
|
20 |
-
</div>
|
21 |
<header class="gradient-bg text-white shadow-lg">
|
22 |
-
<div class="container mx-auto px-4 py-6">
|
23 |
-
<div class="flex justify-between items-center">
|
24 |
-
<div class="flex items-center space-x-3">
|
25 |
-
<i class="fas fa-stream text-3xl"></i>
|
26 |
-
<h1 class="text-2xl font-bold">StreamAI</h1>
|
27 |
-
</div>
|
28 |
-
</div>
|
29 |
-
</div>
|
30 |
</header>
|
31 |
<section class="py-12 bg-white">
|
32 |
<div class="container mx-auto px-4">
|
@@ -42,34 +33,23 @@
|
|
42 |
<div class="production-button" id="production-button">
|
43 |
<i class="fas fa-video"></i>
|
44 |
</div>
|
45 |
-
|
46 |
-
|
47 |
<script type="module">
|
48 |
-
// This code runs immediately. It defines our logger and then tries to load the main app.
|
49 |
const logContainer = document.getElementById('debug-log');
|
50 |
function logToScreen(message) {
|
51 |
if (logContainer) {
|
52 |
const div = document.createElement('div');
|
53 |
-
div.
|
54 |
logContainer.appendChild(div);
|
55 |
}
|
56 |
}
|
57 |
|
58 |
-
logToScreen("HTML loaded. Attempting to import app.js...");
|
59 |
-
|
60 |
try {
|
61 |
-
//
|
62 |
const app = await import('./scripts/app.js');
|
63 |
-
|
64 |
-
|
65 |
} catch (error) {
|
66 |
-
|
67 |
-
// it will be caught here.
|
68 |
-
logToScreen("-----------------------------------------");
|
69 |
-
logToScreen("CRITICAL ERROR FAILED TO LOAD JAVASCRIPT:");
|
70 |
-
logToScreen(error.toString());
|
71 |
-
logToScreen("-----------------------------------------");
|
72 |
-
logToScreen("This error means a file is missing, misspelled in an 'import' statement, or has a syntax error.");
|
73 |
}
|
74 |
</script>
|
75 |
</body>
|
|
|
16 |
<div id="debug-log"></div>
|
17 |
</div>
|
18 |
|
|
|
|
|
19 |
<header class="gradient-bg text-white shadow-lg">
|
20 |
+
<div class="container mx-auto px-4 py-6"><div class="flex justify-between items-center"><div class="flex items-center space-x-3"><i class="fas fa-stream text-3xl"></i><h1 class="text-2xl font-bold">StreamAI</h1></div></div></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</header>
|
22 |
<section class="py-12 bg-white">
|
23 |
<div class="container mx-auto px-4">
|
|
|
33 |
<div class="production-button" id="production-button">
|
34 |
<i class="fas fa-video"></i>
|
35 |
</div>
|
|
|
|
|
36 |
<script type="module">
|
|
|
37 |
const logContainer = document.getElementById('debug-log');
|
38 |
function logToScreen(message) {
|
39 |
if (logContainer) {
|
40 |
const div = document.createElement('div');
|
41 |
+
div.textContent = `> ${message}`;
|
42 |
logContainer.appendChild(div);
|
43 |
}
|
44 |
}
|
45 |
|
|
|
|
|
46 |
try {
|
47 |
+
// Import the app.js module and get its exports
|
48 |
const app = await import('./scripts/app.js');
|
49 |
+
// Now, call the exported function to run the application
|
50 |
+
app.initializeApp();
|
51 |
} catch (error) {
|
52 |
+
logToScreen(`CRITICAL ERROR: Could not execute app.js. Error: ${error.stack}`);
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
</script>
|
55 |
</body>
|