privateuserh commited on
Commit
9de6051
·
verified ·
1 Parent(s): 9d1e840

Update index.html

Browse files
Files changed (1) hide show
  1. 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.innerHTML = `&gt; ${message}`;
54
  logContainer.appendChild(div);
55
  }
56
  }
57
 
58
- logToScreen("HTML loaded. Attempting to import app.js...");
59
-
60
  try {
61
- // We dynamically import the module. This allows us to catch any errors during the import process.
62
  const app = await import('./scripts/app.js');
63
- logToScreen("SUCCESS: app.js and all its dependencies were imported successfully.");
64
- logToScreen("If buttons still don't work, the error is inside the init() functions.");
65
  } catch (error) {
66
- // If there's any error loading app.js OR any file it imports (chat.js, video.js, etc.)
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>