5
0
mirror of git://git.proxmox.com/git/novnc-pve.git synced 2025-03-11 16:58:31 +03:00

update patches for 1.2.0

sneak in some cleanups like dropping the manual loading of the
es6-module loader only to remove it again a few patches later

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-05-17 07:46:13 +02:00
parent 5d20764929
commit bf74ff330e
13 changed files with 167 additions and 192 deletions

View File

@ -1,15 +1,16 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 13 Dec 2016 16:11:35 +0100
Subject: [PATCH 01/12] add pve specific js code
Subject: [PATCH] add PVE specific JS code
this adds a es6 module 'PVEUI' which we use for defining the pve related
methods (API2Request, etc.)
Add a ES6 module named `PVEUI` which defines the Proxmox VE
related helper methods, like for example, API2Request.
we also modify ui.js so that it uses this module and sets up our
autoresizing, commandstoggle, etc.
Hook the `PVEUI` module into the upstream `ui.js`, so that handlers
for `autoresizing`, `commandstoggle`, etc., get setup.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
app/pve.js | 418 +++++++++++++++++++++++++++++++++++++++++++++++++++++
app/ui.js | 66 +++++++--
@ -442,7 +443,7 @@ index 0000000..e2c37fb
+ },
+};
diff --git a/app/ui.js b/app/ui.js
index 17ec48d..4683c02 100644
index c70743d..317f845 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -16,6 +16,7 @@ import keysyms from "../core/input/keysymdef.js";
@ -451,9 +452,9 @@ index 17ec48d..4683c02 100644
import * as WebUtil from "./webutil.js";
+import PVEUI from "./pve.js";
const UI = {
const PAGE_TITLE = "noVNC";
@@ -54,6 +55,8 @@ const UI = {
@@ -56,6 +57,8 @@ const UI = {
// Render default UI and initialize settings menu
start() {
@ -462,7 +463,7 @@ index 17ec48d..4683c02 100644
UI.initSettings();
// Translate the DOM
@@ -81,6 +84,9 @@ const UI = {
@@ -94,6 +97,9 @@ const UI = {
UI.addConnectionControlHandlers();
UI.addClipboardHandlers();
UI.addSettingsHandlers();
@ -472,7 +473,7 @@ index 17ec48d..4683c02 100644
document.getElementById("noVNC_status")
.addEventListener('click', UI.hideStatus);
@@ -89,19 +95,15 @@ const UI = {
@@ -102,19 +108,15 @@ const UI = {
UI.openControlbar();
@ -496,7 +497,7 @@ index 17ec48d..4683c02 100644
return Promise.resolve(UI.rfb);
},
@@ -145,9 +147,10 @@ const UI = {
@@ -158,11 +160,12 @@ const UI = {
/* Populate the controls if defaults are provided in the URL */
UI.initSetting('host', window.location.hostname);
UI.initSetting('port', port);
@ -504,19 +505,21 @@ index 17ec48d..4683c02 100644
+ UI.initSetting('encrypt', true);
UI.initSetting('view_clip', false);
UI.initSetting('resize', 'off');
UI.initSetting('quality', 6);
UI.initSetting('compression', 2);
+ UI.initSetting('autoresize', true);
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
UI.initSetting('show_dot', false);
@@ -334,6 +337,7 @@ const UI = {
@@ -341,6 +344,7 @@ const UI = {
UI.addSettingChangeHandler('resize');
UI.addSettingChangeHandler('resize', UI.applyResizeMode);
UI.addSettingChangeHandler('resize', UI.updateViewClip);
+ UI.addSettingChangeHandler('autoresize');
UI.addSettingChangeHandler('view_clip');
UI.addSettingChangeHandler('view_clip', UI.updateViewClip);
UI.addSettingChangeHandler('shared');
@@ -384,6 +388,9 @@ const UI = {
UI.addSettingChangeHandler('quality');
UI.addSettingChangeHandler('quality', UI.updateQuality);
UI.addSettingChangeHandler('compression');
@@ -395,6 +399,9 @@ const UI = {
document.documentElement.classList.add("noVNC_connecting");
break;
case 'connected':
@ -526,7 +529,7 @@ index 17ec48d..4683c02 100644
document.documentElement.classList.add("noVNC_connected");
break;
case 'disconnecting':
@@ -391,6 +398,11 @@ const UI = {
@@ -402,6 +409,11 @@ const UI = {
document.documentElement.classList.add("noVNC_disconnecting");
break;
case 'disconnected':
@ -537,8 +540,8 @@ index 17ec48d..4683c02 100644
+ }
break;
case 'reconnecting':
transition_elem.textContent = _("Reconnecting...");
@@ -805,6 +817,7 @@ const UI = {
transitionElem.textContent = _("Reconnecting...");
@@ -820,6 +832,7 @@ const UI = {
UI.closePowerPanel();
UI.closeClipboardPanel();
UI.closeExtraKeys();
@ -546,8 +549,8 @@ index 17ec48d..4683c02 100644
},
/* ------^-------
@@ -980,6 +993,12 @@ const UI = {
UI.reconnect_password = password;
@@ -997,6 +1010,12 @@ const UI = {
UI.reconnectPassword = password;
}
+ var password = document.getElementById('noVNC_password_input').value;
@ -559,7 +562,7 @@ index 17ec48d..4683c02 100644
if (password === null) {
password = undefined;
}
@@ -1549,9 +1568,36 @@ const UI = {
@@ -1621,9 +1640,36 @@ const UI = {
/* ------^-------
* /EXTRA KEYS
* ==============
@ -594,14 +597,14 @@ index 17ec48d..4683c02 100644
+ * ==============
+ * MISC
+ * ------v------*/
setMouseButton(num) {
const view_only = UI.rfb.viewOnly;
if (UI.rfb && !view_only) {
updateViewOnly() {
if (!UI.rfb) return;
UI.rfb.viewOnly = UI.getSetting('view_only');
diff --git a/vnc.html b/vnc.html
index 212321b..072d86b 100644
index 32f356f..5ec354a 100644
--- a/vnc.html
+++ b/vnc.html
@@ -191,7 +191,7 @@
@@ -171,7 +171,7 @@
<li class="noVNC_heading">
<img alt="" src="app/images/settings.svg"> Settings
</li>
@ -610,7 +613,7 @@ index 212321b..072d86b 100644
<label><input id="noVNC_setting_shared" type="checkbox"> Shared Mode</label>
</li>
<li>
@@ -201,16 +201,18 @@
@@ -181,16 +181,18 @@
<li>
<label><input id="noVNC_setting_view_clip" type="checkbox"> Clip to Window</label>
</li>

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Wed, 9 May 2018 10:47:53 +0200
Subject: [PATCH 02/12] add custom fbresize event on rfb
Subject: [PATCH] add custom fbresize event on rfb
this can be use to react to changes of the resolution, like resizing the
window
@ -13,10 +13,10 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 files changed, 21 insertions(+)
diff --git a/app/ui.js b/app/ui.js
index 4683c02..1b0f7aa 100644
index 317f845..91bdcf4 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1039,6 +1039,7 @@ const UI = {
@@ -1054,6 +1054,7 @@ const UI = {
UI.rfb.addEventListener("clipboard", UI.clipboardReceive);
UI.rfb.addEventListener("bell", UI.bell);
UI.rfb.addEventListener("desktopname", UI.updateDesktopName);
@ -24,7 +24,7 @@ index 4683c02..1b0f7aa 100644
UI.rfb.clipViewport = UI.getSetting('view_clip');
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
@@ -1593,6 +1594,16 @@ const UI = {
@@ -1665,6 +1666,16 @@ const UI = {
document.getElementById('pve_commands_button').classList.remove("noVNC_selected");
},
@ -42,10 +42,10 @@ index 4683c02..1b0f7aa 100644
* /PVE
* ==============
diff --git a/core/rfb.js b/core/rfb.js
index 89b8130..c079af1 100644
index f35d503..7ea2004 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -1670,6 +1670,16 @@ export default class RFB extends EventTargetMixin {
@@ -2492,6 +2492,16 @@ export default class RFB extends EventTargetMixin {
this._updateClip();
this._updateScale();

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Thu, 11 May 2017 10:34:10 +0200
Subject: [PATCH 03/12] change scaling when toggling fullscreen
Subject: [PATCH] change scaling when toggling fullscreen
when activating fullscreen, we change the scaling to 'scale',
and changing it back when leaving fullscreen
@ -12,10 +12,10 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
1 file changed, 11 insertions(+)
diff --git a/app/ui.js b/app/ui.js
index 1b0f7aa..8cc6cfd 100644
index 91bdcf4..ef2c77f 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1201,6 +1201,13 @@ const UI = {
@@ -1239,6 +1239,13 @@ const UI = {
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
@ -29,7 +29,7 @@ index 1b0f7aa..8cc6cfd 100644
} else {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
@@ -1211,7 +1218,11 @@ const UI = {
@@ -1249,7 +1256,11 @@ const UI = {
} else if (document.body.msRequestFullscreen) {
document.body.msRequestFullscreen();
}

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 13 Dec 2016 16:03:41 +0100
Subject: [PATCH 04/12] add pve style
Subject: [PATCH] add pve style
this adds the custom pve style (based on black.css)
@ -64,10 +64,10 @@ index 0000000..eaeb5cb
+ background: #5BA8DF;
+}
diff --git a/vnc.html b/vnc.html
index 072d86b..57b44a1 100644
index 5ec354a..a49e3a2 100644
--- a/vnc.html
+++ b/vnc.html
@@ -48,7 +48,8 @@
@@ -52,7 +52,8 @@
<link rel="apple-touch-icon" sizes="152x152" type="image/png" href="app/images/icons/novnc-152x152.png">
<!-- Stylesheets -->

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:35:05 +0100
Subject: [PATCH 05/12] remove vnc logos
Subject: [PATCH] remove vnc logos
to show the pve icon instead
@ -11,12 +11,12 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/vnc.html b/vnc.html
index 57b44a1..1420849 100644
index a49e3a2..12db665 100644
--- a/vnc.html
+++ b/vnc.html
@@ -17,36 +17,10 @@
<meta charset="utf-8">
@@ -21,36 +21,10 @@
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <!-- Icons (see app/images/icons/Makefile for what the sizes are for) -->
- <link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/novnc-16x16.png">

View File

@ -1,22 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 17 Jan 2017 17:24:03 +0100
Subject: [PATCH 06/12] change src directory for images/js files
Subject: [PATCH] change source-directory for fetching images/js files
since they will be in /novnc/
since they will be served from `/novnc/`
also change the directory in the build script
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
app/ui.js | 2 +-
vnc.html | 58 +++++++++++++++++++++++++++----------------------------
2 files changed, 30 insertions(+), 30 deletions(-)
vnc.html | 50 +++++++++++++++++++++++++-------------------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/app/ui.js b/app/ui.js
index 8cc6cfd..7201179 100644
index ef2c77f..d604067 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1713,7 +1713,7 @@ l10n.setup(LINGUAS);
@@ -1767,7 +1767,7 @@ l10n.setup(LINGUAS);
if (l10n.language === "en" || l10n.dictionary !== undefined) {
UI.prime();
} else {
@ -26,10 +26,10 @@ index 8cc6cfd..7201179 100644
.catch(err => Log.Error("Failed to load translations: " + err))
.then(UI.prime);
diff --git a/vnc.html b/vnc.html
index 1420849..f93cf89 100644
index 12db665..396ded8 100644
--- a/vnc.html
+++ b/vnc.html
@@ -22,15 +22,15 @@
@@ -26,19 +26,19 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- Stylesheets -->
@ -46,89 +46,62 @@ index 1420849..f93cf89 100644
- <script src="vendor/promise.js"></script>
+ <script src="/novnc/vendor/promise.js"></script>
<!-- ES2015/ES6 modules polyfill -->
<script type="module">
window._noVNC_has_module_support = true;
@@ -39,12 +39,12 @@
window.addEventListener("load", function() {
if (window._noVNC_has_module_support) return;
var loader = document.createElement("script");
- loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
+ loader.src = "/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
document.head.appendChild(loader);
});
</script>
- <script nomodule src="vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
+ <script nomodule src="/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
<!-- actual script modules -->
- <script type="module" crossorigin="anonymous" src="app/ui.js"></script>
+ <script type="module" crossorigin="anonymous" src="/novnc/app/ui.js"></script>
<!-- end scripts -->
</head>
@@ -69,51 +69,51 @@
@@ -63,51 +63,51 @@
<h1 class="noVNC_logo" translate="no"><span>no</span><br>VNC</h1>
<!-- Drag/Pan the viewport -->
- <input type="image" alt="viewport drag" src="app/images/drag.svg"
+ <input type="image" alt="viewport drag" src="/novnc/app/images/drag.svg"
- <input type="image" alt="Drag" src="app/images/drag.svg"
+ <input type="image" alt="Drag" src="/novnc/app/images/drag.svg"
id="noVNC_view_drag_button" class="noVNC_button noVNC_hidden"
title="Move/Drag Viewport">
<!--noVNC Touch Device only buttons-->
<div id="noVNC_mobile_buttons">
- <input type="image" alt="No mousebutton" src="app/images/mouse_none.svg"
+ <input type="image" alt="No mousebutton" src="/novnc/app/images/mouse_none.svg"
id="noVNC_mouse_button0" class="noVNC_button"
title="Active Mouse Button">
- <input type="image" alt="Left mousebutton" src="app/images/mouse_left.svg"
+ <input type="image" alt="Left mousebutton" src="/novnc/app/images/mouse_left.svg"
id="noVNC_mouse_button1" class="noVNC_button"
title="Active Mouse Button">
- <input type="image" alt="Middle mousebutton" src="app/images/mouse_middle.svg"
+ <input type="image" alt="Middle mousebutton" src="/novnc/app/images/mouse_middle.svg"
id="noVNC_mouse_button2" class="noVNC_button"
title="Active Mouse Button">
- <input type="image" alt="Right mousebutton" src="app/images/mouse_right.svg"
+ <input type="image" alt="Right mousebutton" src="/novnc/app/images/mouse_right.svg"
id="noVNC_mouse_button4" class="noVNC_button"
title="Active Mouse Button">
- <input type="image" alt="Keyboard" src="app/images/keyboard.svg"
+ <input type="image" alt="Keyboard" src="/novnc/app/images/keyboard.svg"
id="noVNC_keyboard_button" class="noVNC_button" title="Show Keyboard">
</div>
<!-- Extra manual keys -->
<div id="noVNC_extra_keys">
- <input type="image" alt="Extra keys" src="app/images/toggleextrakeys.svg"
+ <input type="image" alt="Extra keys" src="/novnc/app/images/toggleextrakeys.svg"
id="noVNC_toggle_extra_keys_button" class="noVNC_button"
title="Show Extra Keys">
<div class="noVNC_vcenter">
<div id="noVNC_modifiers" class="noVNC_panel">
- <input type="image" alt="Ctrl" src="app/images/ctrl.svg"
+ <input type="image" alt="Ctrl" src="/novnc/app/images/ctrl.svg"
id="noVNC_toggle_ctrl_button" class="noVNC_button"
title="Toggle Ctrl">
- <input type="image" alt="Alt" src="app/images/alt.svg"
+ <input type="image" alt="Alt" src="/novnc/app/images/alt.svg"
id="noVNC_toggle_alt_button" class="noVNC_button"
title="Toggle Alt">
- <input type="image" alt="Windows" src="app/images/windows.svg"
+ <input type="image" alt="Alt" src="/novnc/app/images/windows.svg"
id="noVNC_toggle_windows_button" class="noVNC_button"
title="Toggle Windows">
- <input type="image" alt="Tab" src="app/images/tab.svg"
+ <input type="image" alt="Tab" src="/novnc/app/images/tab.svg"
id="noVNC_send_tab_button" class="noVNC_button"
title="Send Tab">
- <input type="image" alt="Esc" src="app/images/esc.svg"
+ <input type="image" alt="Esc" src="/novnc/app/images/esc.svg"
id="noVNC_send_esc_button" class="noVNC_button"
title="Send Escape">
- <input type="image" alt="Ctrl+Alt+Del" src="app/images/ctrlaltdel.svg"
+ <input type="image" alt="Ctrl+Alt+Del" src="/novnc/app/images/ctrlaltdel.svg"
id="noVNC_send_ctrl_alt_del_button" class="noVNC_button"
title="Send Ctrl-Alt-Del">
</div>
@@ -121,13 +121,13 @@
- <input type="image" alt="Extra keys" src="app/images/toggleextrakeys.svg"
+ <input type="image" alt="Extra keys" src="/novnc/app/images/toggleextrakeys.svg"
id="noVNC_toggle_extra_keys_button" class="noVNC_button"
title="Show Extra Keys">
<div class="noVNC_vcenter">
<div id="noVNC_modifiers" class="noVNC_panel">
- <input type="image" alt="Ctrl" src="app/images/ctrl.svg"
+ <input type="image" alt="Ctrl" src="/novnc/app/images/ctrl.svg"
id="noVNC_toggle_ctrl_button" class="noVNC_button"
title="Toggle Ctrl">
- <input type="image" alt="Alt" src="app/images/alt.svg"
+ <input type="image" alt="Alt" src="/novnc/app/images/alt.svg"
id="noVNC_toggle_alt_button" class="noVNC_button"
title="Toggle Alt">
- <input type="image" alt="Windows" src="app/images/windows.svg"
+ <input type="image" alt="Windows" src="/novnc/app/images/windows.svg"
id="noVNC_toggle_windows_button" class="noVNC_button"
title="Toggle Windows">
- <input type="image" alt="Tab" src="app/images/tab.svg"
+ <input type="image" alt="Tab" src="/novnc/app/images/tab.svg"
id="noVNC_send_tab_button" class="noVNC_button"
title="Send Tab">
- <input type="image" alt="Esc" src="app/images/esc.svg"
+ <input type="image" alt="Esc" src="/novnc/app/images/esc.svg"
id="noVNC_send_esc_button" class="noVNC_button"
title="Send Escape">
- <input type="image" alt="Ctrl+Alt+Del" src="app/images/ctrlaltdel.svg"
+ <input type="image" alt="Ctrl+Alt+Del" src="/novnc/app/images/ctrlaltdel.svg"
id="noVNC_send_ctrl_alt_del_button" class="noVNC_button"
title="Send Ctrl-Alt-Del">
</div>
</div>
<!-- Shutdown/Reboot -->
@ -144,7 +117,7 @@ index 1420849..f93cf89 100644
</div>
<input type="button" id="noVNC_shutdown_button" value="Shutdown">
<input type="button" id="noVNC_reboot_button" value="Reboot">
@@ -136,13 +136,13 @@
@@ -116,13 +116,13 @@
</div>
<!-- Clipboard -->
@ -160,7 +133,7 @@ index 1420849..f93cf89 100644
</div>
<textarea id="noVNC_clipboard_text" rows=5></textarea>
<br>
@@ -152,19 +152,19 @@
@@ -132,19 +132,19 @@
</div>
<!-- Toggle fullscreen -->
@ -183,7 +156,7 @@ index 1420849..f93cf89 100644
</li>
<li style="display:none;">
<label><input id="noVNC_setting_shared" type="checkbox"> Shared Mode</label>
@@ -241,7 +241,7 @@
@@ -235,7 +235,7 @@
</div>
<!-- Connection Controls -->
@ -192,7 +165,7 @@ index 1420849..f93cf89 100644
id="noVNC_disconnect_button" class="noVNC_button"
title="Disconnect">
@@ -260,7 +260,7 @@
@@ -254,7 +254,7 @@
<div id="noVNC_connect_dlg">
<div class="noVNC_logo" translate="no"><span>no</span>VNC</div>
<div id="noVNC_connect_button"><div>
@ -201,7 +174,7 @@ index 1420849..f93cf89 100644
</div></div>
</div>
</div>
@@ -300,8 +300,8 @@
@@ -298,8 +298,8 @@
</div>
<audio id="noVNC_bell">

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:35:43 +0100
Subject: [PATCH 07/12] add pve vnc commands
Subject: [PATCH] add pve vnc commands
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
@ -9,10 +9,10 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
1 file changed, 21 insertions(+)
diff --git a/vnc.html b/vnc.html
index f93cf89..fad5d4a 100644
index 396ded8..a0802e0 100644
--- a/vnc.html
+++ b/vnc.html
@@ -240,6 +240,27 @@
@@ -234,6 +234,27 @@
</div>
</div>

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:16:09 +0100
Subject: [PATCH 08/12] add replaceable snippets in vnc.html
Subject: [PATCH] add replaceable snippets in vnc.html
so that we can insert the username/csrftoken via search/replace
@ -11,7 +11,7 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/vnc.html b/vnc.html
index fad5d4a..bba7d7d 100644
index a0802e0..5f09cd2 100644
--- a/vnc.html
+++ b/vnc.html
@@ -13,7 +13,7 @@
@ -22,8 +22,8 @@ index fad5d4a..bba7d7d 100644
+ <title>[% nodename %] - Proxmox Console</title>
<meta charset="utf-8">
@@ -26,7 +26,13 @@
@@ -30,7 +30,13 @@
<link rel="stylesheet" href="/novnc/app/styles/pve.css" />
<!-- this is included as a normal file in order to catch script-loading errors as well -->

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Fri, 20 Jan 2017 10:55:49 +0100
Subject: [PATCH 09/12] decrease animation time
Subject: [PATCH] decrease animation time
because 0.5s is too long
@ -11,10 +11,10 @@ Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/styles/base.css b/app/styles/base.css
index 3ca9894..137aec8 100644
index fd78b79..db52eaa 100644
--- a/app/styles/base.css
+++ b/app/styles/base.css
@@ -283,7 +283,7 @@ select:active {
@@ -339,7 +339,7 @@ select:active {
position: fixed;
z-index: 10;
@ -23,7 +23,7 @@ index 3ca9894..137aec8 100644
/* Edge misrenders animations wihthout this */
transform: translateX(0);
@@ -300,7 +300,7 @@ select:active {
@@ -356,7 +356,7 @@ select:active {
position: relative;
left: -100%;
@ -32,7 +32,7 @@ index 3ca9894..137aec8 100644
background-color: rgb(110, 132, 163);
border-radius: 0 10px 10px 0;
@@ -318,7 +318,7 @@ select:active {
@@ -374,7 +374,7 @@ select:active {
height: 100%;
width: 30px;
left: -30px;
@ -41,7 +41,7 @@ index 3ca9894..137aec8 100644
}
#noVNC_control_bar.noVNC_open::before {
box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
@@ -352,7 +352,7 @@ select:active {
@@ -408,7 +408,7 @@ select:active {
}
#noVNC_control_bar_handle:after {
content: "";
@ -50,7 +50,7 @@ index 3ca9894..137aec8 100644
background: url("../images/handle.svg");
position: absolute;
top: 22px; /* (50px-6px)/2 */
@@ -474,7 +474,7 @@ select:active {
@@ -530,7 +530,7 @@ select:active {
.noVNC_panel {
transform: translateX(25px);
@ -59,7 +59,7 @@ index 3ca9894..137aec8 100644
max-height: 100vh; /* Chrome is buggy with 100% */
overflow-x: hidden;
@@ -651,7 +651,7 @@ select:active {
@@ -717,7 +717,7 @@ select:active {
cursor: pointer;

View File

@ -1,38 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Tue, 16 May 2017 10:36:15 +0200
Subject: [PATCH 10/12] use only app.js
Subject: [PATCH] use only app.js
because we will use the commonjs version,
we only need to use the generated app.js
As PVE now uses the commonjs version, there's only need to fetch the
generated app.js
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
vnc.html | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
vnc.html | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/vnc.html b/vnc.html
index bba7d7d..6fb195e 100644
index 5f09cd2..9f594e2 100644
--- a/vnc.html
+++ b/vnc.html
@@ -35,22 +35,7 @@
@@ -39,12 +39,7 @@
</script>
<!-- begin scripts -->
- <!-- promise polyfills promises for IE11 -->
- <script src="/novnc/vendor/promise.js"></script>
- <!-- ES2015/ES6 modules polyfill -->
- <script type="module">
- window._noVNC_has_module_support = true;
- </script>
- <script>
- window.addEventListener("load", function() {
- if (window._noVNC_has_module_support) return;
- var loader = document.createElement("script");
- loader.src = "/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
- document.head.appendChild(loader);
- });
- </script>
- <script nomodule src="/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
- <!-- actual script modules -->
- <script type="module" crossorigin="anonymous" src="/novnc/app/ui.js"></script>
+ <script crossorigin=anonymous" src="/novnc/app.js"></script>

View File

@ -1,31 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak@proxmox.com>
Date: Thu, 19 Jul 2018 11:31:51 +0200
Subject: [PATCH 11/12] add localCursor setting to rfb
Subject: [PATCH] add localCursor setting to rfb
and use it in app.js (default true)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
app/ui.js | 9 +++++++++
app/ui.js | 10 ++++++++++
core/rfb.js | 10 ++++++++++
core/util/cursor.js | 15 ++++++++++++++-
vnc.html | 3 +++
4 files changed, 36 insertions(+), 1 deletion(-)
4 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/app/ui.js b/app/ui.js
index 7201179..35d5d7a 100644
index d604067..d8126bc 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -151,6 +151,7 @@ const UI = {
UI.initSetting('view_clip', false);
UI.initSetting('resize', 'off');
@@ -166,6 +166,7 @@ const UI = {
UI.initSetting('quality', 6);
UI.initSetting('compression', 2);
UI.initSetting('autoresize', true);
+ UI.initSetting('local_cursor', true);
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
UI.initSetting('show_dot', false);
@@ -345,6 +346,8 @@ const UI = {
@@ -356,6 +357,8 @@ const UI = {
UI.addSettingChangeHandler('view_only', UI.updateViewOnly);
UI.addSettingChangeHandler('show_dot');
UI.addSettingChangeHandler('show_dot', UI.updateShowDotCursor);
@ -34,18 +35,19 @@ index 7201179..35d5d7a 100644
UI.addSettingChangeHandler('host');
UI.addSettingChangeHandler('port');
UI.addSettingChangeHandler('path');
@@ -1041,6 +1044,7 @@ const UI = {
@@ -1056,6 +1059,7 @@ const UI = {
UI.rfb.addEventListener("desktopname", UI.updateDesktopName);
UI.rfb.addEventListener("fbresize", UI.updateSessionSize);
UI.rfb.clipViewport = UI.getSetting('view_clip');
+ UI.rfb.localCursor = UI.getSetting('local_cursor');
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
@@ -1638,6 +1642,11 @@ const UI = {
}
},
UI.rfb.qualityLevel = parseInt(UI.getSetting('quality'));
@@ -1692,6 +1696,12 @@ const UI = {
* ==============
* MISC
* ------v------*/
+
+ updateLocalCursor() {
+ if (!UI.rfb) return;
+ UI.rfb.localCursor = UI.getSetting('local_cursor');
@ -55,20 +57,20 @@ index 7201179..35d5d7a 100644
if (!UI.rfb) return;
UI.rfb.viewOnly = UI.getSetting('view_only');
diff --git a/core/rfb.js b/core/rfb.js
index c079af1..2beb00c 100644
index 7ea2004..85c7836 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -246,6 +246,7 @@ export default class RFB extends EventTargetMixin {
@@ -296,6 +296,7 @@ export default class RFB extends EventTargetMixin {
this._clipViewport = false;
this._scaleViewport = false;
this._resizeSession = false;
+ this._localCursor = false;
}
// ===== PROPERTIES =====
@@ -308,6 +309,15 @@ export default class RFB extends EventTargetMixin {
get background() { return this._screen.style.background; }
set background(cssValue) { this._screen.style.background = cssValue; }
this._showDotCursor = false;
if (options.showDotCursor !== undefined) {
@@ -356,6 +357,15 @@ export default class RFB extends EventTargetMixin {
}
}
+ get localCursor() { return this._localCursor; }
+ set localCursor(localCursor) {
@ -79,11 +81,11 @@ index c079af1..2beb00c 100644
+ }
+ }
+
// ===== PUBLIC METHODS =====
disconnect() {
get showDotCursor() { return this._showDotCursor; }
set showDotCursor(show) {
this._showDotCursor = show;
diff --git a/core/util/cursor.js b/core/util/cursor.js
index 0d0b754..73d7880 100644
index 4db1dab..e5b1768 100644
--- a/core/util/cursor.js
+++ b/core/util/cursor.js
@@ -12,6 +12,8 @@ export default class Cursor {
@ -95,7 +97,7 @@ index 0d0b754..73d7880 100644
this._canvas = document.createElement('canvas');
if (useFallback) {
@@ -115,7 +117,7 @@ export default class Cursor {
@@ -110,7 +112,7 @@ export default class Cursor {
}
clear() {
@ -104,8 +106,8 @@ index 0d0b754..73d7880 100644
this._canvas.width = 0;
this._canvas.height = 0;
this._position.x = this._position.x + this._hotSpot.x;
@@ -124,6 +126,11 @@ export default class Cursor {
this._hotSpot.y = 0;
@@ -140,6 +142,11 @@ export default class Cursor {
this._updateVisibility(target);
}
+ setLocalCursor(cursor) {
@ -116,22 +118,29 @@ index 0d0b754..73d7880 100644
_handleMouseOver(event) {
// This event could be because we're entering the target, or
// moving around amongst its sub elements. Let the move handler
@@ -218,4 +225,10 @@ export default class Cursor {
this._canvas.style.left = this._position.x + "px";
this._canvas.style.top = this._position.y + "px";
@@ -192,6 +199,11 @@ export default class Cursor {
}
}
+
+ _updateLocalCursor() {
+ if (this._target)
+ this._target.style.cursor = this._showLocalCursor ? 'default' : 'none';
+ }
+
_showCursor() {
if (this._canvas.style.visibility === 'hidden') {
this._canvas.style.visibility = '';
@@ -250,4 +262,5 @@ export default class Cursor {
return document.captureElement &&
document.documentElement.contains(document.captureElement);
}
+
}
diff --git a/vnc.html b/vnc.html
index 6fb195e..d48091d 100644
index 9f594e2..bf1fde5 100644
--- a/vnc.html
+++ b/vnc.html
@@ -167,6 +167,9 @@
@@ -157,6 +157,9 @@
<li>
<label><input id="noVNC_setting_view_clip" type="checkbox"> Clip to Window</label>
</li>

View File

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Marx <t.marx@proxmox.com>
Date: Fri, 21 Dec 2018 11:46:13 +0100
Subject: [PATCH 12/12] pass custom command to vnc
Subject: [PATCH] pass custom command to vnc
Signed-off-by: Tim Marx <t.marx@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>

View File

@ -1,9 +1,9 @@
0001-add-pve-specific-js-code.patch
0001-add-PVE-specific-JS-code.patch
0002-add-custom-fbresize-event-on-rfb.patch
0003-change-scaling-when-toggling-fullscreen.patch
0004-add-pve-style.patch
0005-remove-vnc-logos.patch
0006-change-src-directory-for-images-js-files.patch
0006-change-source-directory-for-fetching-images-js-files.patch
0007-add-pve-vnc-commands.patch
0008-add-replaceable-snippets-in-vnc.html.patch
0009-decrease-animation-time.patch