diff --git a/debian/patches/0001-add-pve-specific-js-code.patch b/debian/patches/0001-add-PVE-specific-JS-code.patch similarity index 93% rename from debian/patches/0001-add-pve-specific-js-code.patch rename to debian/patches/0001-add-PVE-specific-JS-code.patch index 44e62a5..22dffe7 100644 --- a/debian/patches/0001-add-pve-specific-js-code.patch +++ b/debian/patches/0001-add-PVE-specific-JS-code.patch @@ -1,15 +1,16 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 +Signed-off-by: Thomas Lamprecht --- 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 @@
  • Settings
  • @@ -610,7 +613,7 @@ index 212321b..072d86b 100644
  • -@@ -201,16 +201,18 @@ +@@ -181,16 +181,18 @@
  • diff --git a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch index a63e049..50c3d6e 100644 --- a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch +++ b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 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(); diff --git a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch index 3f6080e..f9ec196 100644 --- a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch +++ b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 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(); } diff --git a/debian/patches/0004-add-pve-style.patch b/debian/patches/0004-add-pve-style.patch index a733168..1a44edf 100644 --- a/debian/patches/0004-add-pve-style.patch +++ b/debian/patches/0004-add-pve-style.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 @@ diff --git a/debian/patches/0005-remove-vnc-logos.patch b/debian/patches/0005-remove-vnc-logos.patch index aca64d9..dae5b78 100644 --- a/debian/patches/0005-remove-vnc-logos.patch +++ b/debian/patches/0005-remove-vnc-logos.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 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 @@ - - +@@ -21,36 +21,10 @@ + Remove this if you use the .htaccess --> + - - diff --git a/debian/patches/0006-change-src-directory-for-images-js-files.patch b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch similarity index 57% rename from debian/patches/0006-change-src-directory-for-images-js-files.patch rename to debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch index b5e051a..151adcd 100644 --- a/debian/patches/0006-change-src-directory-for-images-js-files.patch +++ b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch @@ -1,22 +1,22 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dominik Csapak 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 --- 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 @@ @@ -46,89 +46,62 @@ index 1420849..f93cf89 100644 - + - +- ++ - + -@@ -69,51 +69,51 @@ +@@ -63,51 +63,51 @@

    no
    VNC

    --
    -- -- -- -- -
    -
    -- -
    -
    -- -- -- -- -- -- -
    -@@ -121,13 +121,13 @@ +- +
    +
    +- +- +- +- +- +- +
    @@ -144,7 +117,7 @@ index 1420849..f93cf89 100644
    -@@ -136,13 +136,13 @@ +@@ -116,13 +116,13 @@
    @@ -160,7 +133,7 @@ index 1420849..f93cf89 100644
    -@@ -152,19 +152,19 @@ +@@ -132,19 +132,19 @@ @@ -183,7 +156,7 @@ index 1420849..f93cf89 100644
  • -@@ -241,7 +241,7 @@ +@@ -235,7 +235,7 @@ @@ -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 @@
    @@ -201,7 +174,7 @@ index 1420849..f93cf89 100644
    -@@ -300,8 +300,8 @@ +@@ -298,8 +298,8 @@
  • diff --git a/debian/patches/0012-pass-custom-command-to-vnc.patch b/debian/patches/0012-pass-custom-command-to-vnc.patch index 3999212..b3aca0c 100644 --- a/debian/patches/0012-pass-custom-command-to-vnc.patch +++ b/debian/patches/0012-pass-custom-command-to-vnc.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tim Marx 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 Signed-off-by: Dominik Csapak diff --git a/debian/patches/series b/debian/patches/series index c8affc6..0bfea05 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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