From 5b03a465fc29a8370696a4aaccfd3ebbf2c2f042 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Thu, 11 May 2023 02:56:40 +0300 Subject: [PATCH] Add initial support for stateUrls --- resources/sys/finder/finder.js | 2 +- resources/wde.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/sys/finder/finder.js b/resources/sys/finder/finder.js index 4fa21b0..2a64bbc 100644 --- a/resources/sys/finder/finder.js +++ b/resources/sys/finder/finder.js @@ -140,7 +140,7 @@ class FinderWindow{ windowElem = undefined async Init(args){ - console.log(args) + // console.log(args) if (args[1] === "-desktop"){ const params = new URLSearchParams({ isMobile: WebDesktopEnvironment.isMobile, diff --git a/resources/wde.js b/resources/wde.js index 678eb31..a44de3e 100644 --- a/resources/wde.js +++ b/resources/wde.js @@ -194,6 +194,7 @@ class WebDesktopEnvironment{ */ static CreateNewWindow(appId, width, height) { let newWindow = document.createElement("div") + newWindow.setAttribute('appid', appId) if (WebDesktopEnvironment.isMobile){ newWindow.setAttribute("class", "MobileApplicationWindow") document.body.querySelector('#windows-layer').appendChild(newWindow) @@ -341,9 +342,14 @@ class WindowsCompositor{ previousWindow.classList.remove("Focused") window.classList.add("Focused") } + // WindowsCompositor.ChangeURL(window) } + static ChangeURL(appWindow){ + let appId = appWindow.getAttribute('appid') + window.history.replaceState(null, "", `/${appId}/`); + } }