From 1f7d4b268995ab6186b80209eeb00b8fa615a357 Mon Sep 17 00:00:00 2001 From: matt mcclaskey Date: Thu, 14 Aug 2025 14:19:57 +0000 Subject: [PATCH] VNC-122 fix bug with brave, fix location of disconnect.html --- app/ui.js | 2 +- core/util/browser.js | 2 +- vite.config.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ui.js b/app/ui.js index 86b98ea7..b08833e3 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1571,7 +1571,7 @@ const UI = { // in some cases the intra-frame message could be blocked, fall back to navigating to a disconnect page. setTimeout(function() { - window.location.replace('/disconnected.html'); + window.location.replace('disconnected.html'); }, 10000); } else { //send keep-alive diff --git a/core/util/browser.js b/core/util/browser.js index 3296e108..429350d0 100644 --- a/core/util/browser.js +++ b/core/util/browser.js @@ -27,7 +27,7 @@ window.addEventListener('touchstart', function onFirstTouch() { // brings us a bit closer but is not optimal. export let dragThreshold = 10 * (window.devicePixelRatio || 1); -export const supportsKeyboardLock = ('keyboard' in navigator && 'lock' in navigator.keyboard && typeof(navigator.keyboard.lock) === 'function'); +export const supportsKeyboardLock = typeof navigator.keyboard?.lock === 'function'; let _supportsCursorURIs = false; diff --git a/vite.config.js b/vite.config.js index 90905a95..21e39973 100644 --- a/vite.config.js +++ b/vite.config.js @@ -13,11 +13,11 @@ export default defineConfig({ plugins: [ viteCommonjs(), envCompatible(), - //ViteMinifyPlugin(), + ViteMinifyPlugin(), ViteRestart({restart: ['core/**', 'app/**','kasmvnc-version.txt']}), ], build: { - sourcemap: true, + sourcemap: false, rollupOptions: { input: { main: './index.html',