diff --git a/app/ui.js b/app/ui.js index 83def8d3..86b98ea7 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1566,7 +1566,13 @@ const UI = { } if (timeSinceLastActivityInS > idleDisconnectInS) { + Log.Warn("Idle Disconnect reached, disconnecting rfb session..."); parent.postMessage({ action: 'idle_session_timeout', value: 'Idle session timeout exceeded'}, '*' ); + + // 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'); + }, 10000); } else { //send keep-alive UI.rfb.sendKey(1, null, false); diff --git a/public/disconnected.html b/public/disconnected.html new file mode 100644 index 00000000..a8965ae9 --- /dev/null +++ b/public/disconnected.html @@ -0,0 +1,72 @@ + + + + +Session Disconnected + + + + +
+
⚠️
+

Session Disconnected

+

Your remote session has ended due to inactivity or disconnection.

+ Return to Dashboard +
+ + diff --git a/vite.config.js b/vite.config.js index f09cadc0..90905a95 100644 --- a/vite.config.js +++ b/vite.config.js @@ -13,10 +13,11 @@ export default defineConfig({ plugins: [ viteCommonjs(), envCompatible(), - ViteMinifyPlugin(), + //ViteMinifyPlugin(), ViteRestart({restart: ['core/**', 'app/**','kasmvnc-version.txt']}), ], build: { + sourcemap: true, rollupOptions: { input: { main: './index.html',