diff --git a/static/public/filepath-helper.js b/static/public/filepath-helper.js new file mode 100644 index 0000000..e97e0e0 --- /dev/null +++ b/static/public/filepath-helper.js @@ -0,0 +1,13 @@ +class filePathHelper { + constructor(URL) { + this.url = URL; + //this.relativeURL = isRelative; + this.convertedURL = null; + } + + relativeToAbsolute() { + let currentURL = window.location.origin + window.location.pathname; + this.convertedURL = currentURL.replace(window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1), this.url); + return this.convertedURL; + } +} \ No newline at end of file diff --git a/static/public/index.html b/static/public/index.html index b8eb812..a4c97d6 100644 --- a/static/public/index.html +++ b/static/public/index.html @@ -1,13 +1,11 @@ -
Developed by: dyamuh
-Backend: dyamuh with UV backend
+Backend: dyamuh (using UV backend)
Frontend: dyamuh, darkcat736, norsegod99
+Support: Riftriot
This service is not currently available.
+ + \ No newline at end of file diff --git a/static/public/phantomchat/style.css b/static/public/phantomchat/style.css new file mode 100644 index 0000000..e2e527c --- /dev/null +++ b/static/public/phantomchat/style.css @@ -0,0 +1,7 @@ +body { + overflow: hidden; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #202020; + color: #d0d0d0; + color: white; +} \ No newline at end of file diff --git a/static/public/script.js b/static/public/script.js index 557f5bc..725d8a7 100644 --- a/static/public/script.js +++ b/static/public/script.js @@ -35,15 +35,15 @@ timeButton.addEventListener('click', () => { wifiStatus.textContent = "Connected"; -// COMBINED event listener for app icons and start menu items: [...appIcons, ...appListItems].forEach(item => { item.addEventListener('click', () => { const app = item.getAttribute('data-app'); const window = document.getElementById(`${app}-window`); - if (app === 'google') { - const uvFrame = document.getElementById('uv-frame'); - const iframeSrc = item.dataset.iframeSrc; + if (app === 'google' || app === 'chat') { + const uvFrame = window.querySelector('iframe'); + const iframeSrc = new filePathHelper(item.dataset.iframeSrc).relativeToAbsolute(); + console.log(new filePathHelper(item.dataset.iframeSrc).relativeToAbsolute()); uvFrame.src = iframeSrc; } @@ -52,7 +52,7 @@ wifiStatus.textContent = "Connected"; window.classList.add('show'); bringWindowToFront(window); - if (appList.classList.contains('show')) { // Only close if app list is open + if (appList.classList.contains('show')) { appList.classList.remove('show'); } @@ -70,7 +70,6 @@ wifiStatus.textContent = "Connected"; }); }); - windows.forEach(window => { const minimizeButton = window.querySelector('.minimize'); const maximizeButton = window.querySelector('.maximize'); @@ -169,7 +168,6 @@ startButton.addEventListener('click', () => { appList.classList.toggle('show'); }); - function bringWindowToFront(window) { const allWindows = document.querySelectorAll('.window'); let maxZIndex = 10; @@ -253,7 +251,6 @@ themeButtons.forEach(button => { }); }); - const rainCanvas = document.getElementById('rainCanvas'); const ctx = rainCanvas.getContext('2d'); rainCanvas.width = window.innerWidth; @@ -293,3 +290,49 @@ window.addEventListener('resize', () => { rainCanvas.height = window.innerHeight; }); +let timeout; + +function V2() { + let shouldRun = true; + function loop() { + if (!shouldRun) return; + + const numRaindrops = 100; + + for (let i = 0; i < numRaindrops; i++) { + const raindrop = document.createElement('div'); + raindrop.classList.add('raindrop'); + const randomX = Math.random() * 100; + const randomDelay = Math.random() * 5; + + raindrop.style.opacity = 1; + raindrop.style.left = `${randomX}vw`; + raindrop.style.animationDuration = `${Math.random() * 6 + 1}s`; + raindrop.style.animationDelay = `-${randomDelay}s`; + + document.body.appendChild(raindrop); + } + } + loop(); + + console.log("Wallpaper changed to V2"); +} + +function stopV2() { + clearTimeout(timeout); +} + +function switchToV2() { + V2(); + rainCanvas.style.opacity = 0; +} + +function switchToV1() { + rainCanvas.style.opacity = 1; + const raindrops = document.querySelectorAll('.raindrop'); + raindrops.forEach(raindrop => raindrop.remove()); +} + +function switchToV3(){ + canvas3.style.opacity = 0; +}