feat: categories, runtime nav, and UX updates
This commit is contained in:
+4
-9
@@ -25,7 +25,7 @@ cat > /opt/portal/index.html <<HTML
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Инфра полигон МОНТ</title>
|
||||
<title>Инфрастуктурный полигон МОНТ</title>
|
||||
<style>
|
||||
html,body,#screen{margin:0;height:100%;background:#111}
|
||||
.nav-panel{
|
||||
@@ -45,17 +45,13 @@ cat > /opt/portal/index.html <<HTML
|
||||
<div id="screen"></div>
|
||||
<div class="nav-panel">
|
||||
<button class="nav-btn" id="btn-back" type="button">Назад</button>
|
||||
<button class="nav-btn" id="btn-forward" type="button">Вперед</button>
|
||||
<button class="nav-btn" id="btn-home" type="button">Домой</button>
|
||||
<button class="nav-btn" id="btn-home" type="button">Главная</button>
|
||||
</div>
|
||||
<script type="module">
|
||||
import RFB from './core/rfb.js';
|
||||
const XK_ALT_L = 0xffe9;
|
||||
const XK_CONTROL_L = 0xffe3;
|
||||
const XK_LEFT = 0xff51;
|
||||
const XK_RIGHT = 0xff53;
|
||||
const XK_ENTER = 0xff0d;
|
||||
const HOME_URL = ${HOME_URL@Q};
|
||||
const XK_LEFT = 0xff51;
|
||||
const HOME_URL = ${HOME_URL@Q};
|
||||
const wsBase = location.pathname.replace(/\/+$/, '');
|
||||
const wsUrl = (location.protocol === 'https:' ? 'wss://' : 'ws://') + location.host + wsBase + '/websockify';
|
||||
const rfb = new RFB(document.getElementById('screen'), wsUrl);
|
||||
@@ -97,7 +93,6 @@ cat > /opt/portal/index.html <<HTML
|
||||
window.location.href = '/';
|
||||
}
|
||||
document.getElementById('btn-back').addEventListener('click', () => chord(XK_ALT_L, XK_LEFT, "AltLeft", "ArrowLeft"));
|
||||
document.getElementById('btn-forward').addEventListener('click', () => chord(XK_ALT_L, XK_RIGHT, "AltLeft", "ArrowRight"));
|
||||
document.getElementById('btn-home').addEventListener('click', goHome);
|
||||
document.addEventListener('contextmenu', (e) => e.preventDefault());
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user