Files
mrs/client/public/desktop.html
T
2026-09-15 00:11:53 -04:00

31 lines
910 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Remote Desktop</title>
<style>
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #000; }
#screen { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="screen"></div>
<script type="module">
import RFB from '/vnc/novnc/core/rfb.js';
const screen = document.querySelector('#screen');
const protocol = location.protocol === 'https:' ? 'wss' : 'ws';
const rfb = new RFB(screen, `${protocol}://${location.host}/ws/vnc`);
rfb.scaleViewport = true;
rfb.resizeSession = false;
rfb.showDotCursor = true;
rfb.addEventListener('connect', () => console.log('RFB connected'));
rfb.addEventListener('disconnect', event => console.log('RFB disconnected', event.detail));
</script>
</body>
</html>