darkc0de commited on
Commit
b53acdc
·
verified ·
1 Parent(s): 3c42032

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +33 -27
index.html CHANGED
@@ -370,7 +370,6 @@
370
  <span class="text-xs text-center font-medium text-pink-100 drop-shadow-md">Calculator</span>
371
  </div>
372
 
373
- <!-- NEW MASTER SPEC DESKTOP ICON -->
374
  <div class="desktop-icon flex flex-col items-center p-3 rounded-lg w-24" onclick="openWindow('spec')">
375
  <div class="w-12 h-12 bg-gray-900 rounded-lg flex items-center justify-center mb-2 border border-red-500/30 shadow-lg shadow-red-500/20">
376
  <i data-lucide="book-open" class="w-6 h-6 text-red-400"></i>
@@ -378,7 +377,6 @@
378
  <span class="text-xs text-center font-medium text-red-100 drop-shadow-md">Master Spec</span>
379
  </div>
380
 
381
- <!-- NEW XOR'S FAVS DESKTOP ICON -->
382
  <div class="desktop-icon flex flex-col items-center p-3 rounded-lg w-24" onclick="openWindow('favs')">
383
  <div class="w-12 h-12 bg-gray-900 rounded-lg flex items-center justify-center mb-2 border border-yellow-500/30 shadow-lg shadow-yellow-500/20">
384
  <i data-lucide="star" class="w-6 h-6 text-yellow-400"></i>
@@ -998,62 +996,70 @@
998
  const statusText = document.getElementById('boot-status-text');
999
  const bootScreen = document.getElementById('boot-screen');
1000
 
1001
- // 1. Text Typing Phase
1002
  for (let i = 0; i < bootLogData.length; i++) {
1003
  const line = document.createElement('div');
1004
  line.textContent = `> ${bootLogData[i]}`;
1005
  logsContainer.appendChild(line);
1006
  logsWrapper.scrollTop = logsWrapper.scrollHeight;
1007
 
1008
- // Randomize delay to look like real loading
1009
- const delay = Math.floor(Math.random() * 150) + 20;
1010
  await new Promise(r => setTimeout(r, delay));
1011
  }
1012
 
1013
- await new Promise(r => setTimeout(r, 400)); // Pause before splash
1014
 
1015
- // 2. Splash Screen Phase
1016
  logsContainer.style.display = 'none';
1017
  splash.classList.remove('hidden');
1018
  title.classList.add('glitch-anim');
1019
 
1020
- // Quick fake progress bar
1021
  const statuses = ["Mounting Drives...", "Decrypting...", "Starting Services...", "Launching GUI..."];
1022
  let progress = 0;
1023
 
1024
- while (progress <= 100) {
 
 
 
 
1025
  progressBar.style.width = `${progress}%`;
1026
  progressPercent.textContent = `${progress}%`;
1027
 
1028
- if (progress === 25) statusText.textContent = statuses[1];
1029
- if (progress === 60) statusText.textContent = statuses[2];
1030
- if (progress === 90) statusText.textContent = statuses[3];
1031
 
1032
- progress += Math.floor(Math.random() * 10) + 2;
1033
- if (progress > 100) progress = 100;
1034
-
1035
- await new Promise(r => setTimeout(r, Math.random() * 80 + 20));
1036
  }
1037
 
1038
- await new Promise(r => setTimeout(r, 600)); // Hold on 100%
1039
 
1040
- // 3. Fade Out
1041
- title.classList.remove('glitch-anim'); // stop glitch for smooth fade
1042
  bootScreen.classList.add('fade-out-os');
1043
 
1044
  // 4. Trigger Desktop initialization after fade
1045
  setTimeout(() => {
1046
- bootScreen.remove(); // Remove overlay completely from DOM
1047
-
1048
- // Show welcome alert
1049
- const alertBox = document.getElementById('system-alert');
1050
- alertBox.style.display = 'flex';
1051
-
1052
- // Auto-open browser
1053
  openWindow('browser');
1054
- }, 800); // Matches the CSS animation duration
1055
  }
1056
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1057
  // Run boot sequence as soon as script runs
1058
  runBootSequence();
1059
 
 
370
  <span class="text-xs text-center font-medium text-pink-100 drop-shadow-md">Calculator</span>
371
  </div>
372
 
 
373
  <div class="desktop-icon flex flex-col items-center p-3 rounded-lg w-24" onclick="openWindow('spec')">
374
  <div class="w-12 h-12 bg-gray-900 rounded-lg flex items-center justify-center mb-2 border border-red-500/30 shadow-lg shadow-red-500/20">
375
  <i data-lucide="book-open" class="w-6 h-6 text-red-400"></i>
 
377
  <span class="text-xs text-center font-medium text-red-100 drop-shadow-md">Master Spec</span>
378
  </div>
379
 
 
380
  <div class="desktop-icon flex flex-col items-center p-3 rounded-lg w-24" onclick="openWindow('favs')">
381
  <div class="w-12 h-12 bg-gray-900 rounded-lg flex items-center justify-center mb-2 border border-yellow-500/30 shadow-lg shadow-yellow-500/20">
382
  <i data-lucide="star" class="w-6 h-6 text-yellow-400"></i>
 
996
  const statusText = document.getElementById('boot-status-text');
997
  const bootScreen = document.getElementById('boot-screen');
998
 
999
+ // 1. Text Typing Phase (~900ms)
1000
  for (let i = 0; i < bootLogData.length; i++) {
1001
  const line = document.createElement('div');
1002
  line.textContent = `> ${bootLogData[i]}`;
1003
  logsContainer.appendChild(line);
1004
  logsWrapper.scrollTop = logsWrapper.scrollHeight;
1005
 
1006
+ // Very fast terminal speed
1007
+ const delay = Math.floor(Math.random() * 30) + 10;
1008
  await new Promise(r => setTimeout(r, delay));
1009
  }
1010
 
1011
+ await new Promise(r => setTimeout(r, 200));
1012
 
1013
+ // 2. Splash Screen Phase (~2 seconds)
1014
  logsContainer.style.display = 'none';
1015
  splash.classList.remove('hidden');
1016
  title.classList.add('glitch-anim');
1017
 
 
1018
  const statuses = ["Mounting Drives...", "Decrypting...", "Starting Services...", "Launching GUI..."];
1019
  let progress = 0;
1020
 
1021
+ // Fixed loop condition so it never hangs
1022
+ while (progress < 100) {
1023
+ progress += Math.floor(Math.random() * 15) + 5; // Fast chunks
1024
+ if (progress > 100) progress = 100;
1025
+
1026
  progressBar.style.width = `${progress}%`;
1027
  progressPercent.textContent = `${progress}%`;
1028
 
1029
+ if (progress >= 25 && progress < 60) statusText.textContent = statuses[1];
1030
+ if (progress >= 60 && progress < 90) statusText.textContent = statuses[2];
1031
+ if (progress >= 90) statusText.textContent = statuses[3];
1032
 
1033
+ await new Promise(r => setTimeout(r, Math.random() * 60 + 20));
 
 
 
1034
  }
1035
 
1036
+ await new Promise(r => setTimeout(r, 400)); // Hold briefly on 100%
1037
 
1038
+ // 3. Fade Out (800ms)
1039
+ title.classList.remove('glitch-anim');
1040
  bootScreen.classList.add('fade-out-os');
1041
 
1042
  // 4. Trigger Desktop initialization after fade
1043
  setTimeout(() => {
1044
+ bootScreen.remove();
1045
+ document.getElementById('system-alert').style.display = 'flex';
 
 
 
 
 
1046
  openWindow('browser');
1047
+ }, 800);
1048
  }
1049
 
1050
+ // Failsafe Timeout: GUARANTEES desktop loads no matter what in exactly 5.5 seconds.
1051
+ setTimeout(() => {
1052
+ const bootScreen = document.getElementById('boot-screen');
1053
+ if(bootScreen && bootScreen.parentNode) {
1054
+ bootScreen.remove();
1055
+ document.getElementById('system-alert').style.display = 'flex';
1056
+ const browserWin = document.getElementById('window-browser');
1057
+ if(browserWin && browserWin.classList.contains('hidden')) {
1058
+ openWindow('browser');
1059
+ }
1060
+ }
1061
+ }, 5500);
1062
+
1063
  // Run boot sequence as soon as script runs
1064
  runBootSequence();
1065