diff --git a/desktop/app.js b/desktop/app.js index e4d43c8..584c5f2 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -702,19 +702,6 @@ function renderVideo(peerId, displayName, stream, source) {
${label}
`; - container.onclick = () => { - const isFullscreen = container.classList.contains('fullscreen'); - // Reset all - document.querySelectorAll('.video-item').forEach(el => el.classList.remove('fullscreen')); - - if (isFullscreen) { - el.videoGrid.classList.remove('has-fullscreen'); - } else { - container.classList.add('fullscreen'); - el.videoGrid.classList.add('has-fullscreen'); - } - }; - el.videoGrid.appendChild(container); videoEl = container.querySelector("video"); } diff --git a/desktop/styles.css b/desktop/styles.css index fa213cb..03887fe 100644 --- a/desktop/styles.css +++ b/desktop/styles.css @@ -638,14 +638,7 @@ select { background: #000; border-radius: var(--radius-lg); overflow: hidden; - transition: all var(--transition); - cursor: pointer; - z-index: 1; -} - -.video-item:hover { - box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); - z-index: 2; + transition: box-shadow var(--transition); } .video-item video { @@ -653,37 +646,6 @@ select { height: 100%; object-fit: contain; background: #000; - pointer-events: none; -} - -/* Fullscreen Feed Support */ -.video-grid.has-fullscreen { - display: flex; - padding: 0; - overflow: hidden; - position: absolute; - top: 48px; - /* Below chat-header */ - left: 0; - right: 0; - bottom: 0; - z-index: 100; - background: var(--bg-main); -} - -.video-grid.has-fullscreen .video-item { - display: none; -} - -.video-grid.has-fullscreen .video-item.fullscreen { - display: block; - flex: 1; - width: 100%; - height: 100%; - border-radius: 0; - cursor: zoom-out; - z-index: 10; - aspect-ratio: auto; } .video-item .video-label { @@ -697,8 +659,6 @@ select { border-radius: 100px; font-size: 12px; font-weight: 500; - pointer-events: none; - z-index: 5; } /* Voice Activity */ @@ -826,7 +786,6 @@ select { /* Chat Pane */ /* ═══════════════════════════════════════════════════════════ */ .chat-pane { - position: relative; display: flex; flex-direction: column; background: var(--bg-main); diff --git a/main.js b/main.js index 9cf53ae..67053af 100644 --- a/main.js +++ b/main.js @@ -64,36 +64,29 @@ function createWindow() { console.log(`Loading desktop app from: ${localUrl}`); - const loadDesktopApp = (queryParams = '') => { - const fullUrl = queryParams ? `${localUrl}&${queryParams}` : localUrl; - win.loadURL(fullUrl).catch((err) => { + const loadDesktopApp = () => { + win.loadURL(localUrl).catch((err) => { console.error(`Failed to load desktop file: ${err}`); }); }; // Use a navigation listener to detect when the remote login is complete win.webContents.on('will-navigate', (event, navigatedUrl) => { - try { - const urlObj = new URL(navigatedUrl); - const backendObj = new URL(backendUrl); - if (urlObj.origin === backendObj.origin && urlObj.pathname === '/') { - console.log("Detected remote landing (login success), returning to desktop UI..."); - event.preventDefault(); - loadDesktopApp(urlObj.search.slice(1)); - } - } catch (e) { - console.error(e); + const normalizedNav = navigatedUrl.replace(/\/$/, ''); + // If the user lands back on the remote root, they are logged in. + // Redirect them back to our local bugfixed desktop UI. + if (normalizedNav === backendUrl) { + console.log("Detected remote landing (login success), returning to desktop UI..."); + event.preventDefault(); + loadDesktopApp(); } }); win.webContents.on('did-navigate', (event, navigatedUrl) => { - try { - const urlObj = new URL(navigatedUrl); - const backendObj = new URL(backendUrl); - if (urlObj.origin === backendObj.origin && urlObj.pathname === '/') { - loadDesktopApp(urlObj.search.slice(1)); - } - } catch (e) { } + const normalizedNav = navigatedUrl.replace(/\/$/, ''); + if (normalizedNav === backendUrl) { + loadDesktopApp(); + } }); loadDesktopApp(); @@ -102,9 +95,6 @@ function createWindow() { // win.webContents.openDevTools(); } -app.commandLine.appendSwitch('disable-webrtc-hw-encoding'); // Sometime helps resolve codec mismatch behavior -app.commandLine.appendSwitch('log-level', '3'); // Silences standard Chromium warning logs (like SRTP transport unprotect logs which are benign timing issues) - app.whenReady().then(() => { createWindow(); diff --git a/static/app.js b/static/app.js index b25e224..e8e0058 100644 --- a/static/app.js +++ b/static/app.js @@ -684,19 +684,6 @@ function renderVideo(peerId, displayName, stream, source) {
${label}
`; - container.onclick = () => { - const isFullscreen = container.classList.contains('fullscreen'); - // Reset all - document.querySelectorAll('.video-item').forEach(el => el.classList.remove('fullscreen')); - - if (isFullscreen) { - el.videoGrid.classList.remove('has-fullscreen'); - } else { - container.classList.add('fullscreen'); - el.videoGrid.classList.add('has-fullscreen'); - } - }; - el.videoGrid.appendChild(container); videoEl = container.querySelector("video"); } diff --git a/static/styles.css b/static/styles.css index fa213cb..03887fe 100644 --- a/static/styles.css +++ b/static/styles.css @@ -638,14 +638,7 @@ select { background: #000; border-radius: var(--radius-lg); overflow: hidden; - transition: all var(--transition); - cursor: pointer; - z-index: 1; -} - -.video-item:hover { - box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2); - z-index: 2; + transition: box-shadow var(--transition); } .video-item video { @@ -653,37 +646,6 @@ select { height: 100%; object-fit: contain; background: #000; - pointer-events: none; -} - -/* Fullscreen Feed Support */ -.video-grid.has-fullscreen { - display: flex; - padding: 0; - overflow: hidden; - position: absolute; - top: 48px; - /* Below chat-header */ - left: 0; - right: 0; - bottom: 0; - z-index: 100; - background: var(--bg-main); -} - -.video-grid.has-fullscreen .video-item { - display: none; -} - -.video-grid.has-fullscreen .video-item.fullscreen { - display: block; - flex: 1; - width: 100%; - height: 100%; - border-radius: 0; - cursor: zoom-out; - z-index: 10; - aspect-ratio: auto; } .video-item .video-label { @@ -697,8 +659,6 @@ select { border-radius: 100px; font-size: 12px; font-weight: 500; - pointer-events: none; - z-index: 5; } /* Voice Activity */ @@ -826,7 +786,6 @@ select { /* Chat Pane */ /* ═══════════════════════════════════════════════════════════ */ .chat-pane { - position: relative; display: flex; flex-direction: column; background: var(--bg-main); diff --git a/test.html b/test.html deleted file mode 100644 index b7652f7..0000000 --- a/test.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - -
-
Header
-
-
Click me
-
Another
-
-
- - -