[pve-devel] [PATCH novnc 2/3] rebase novnc patches on 1.0.0
Dominik Csapak
d.csapak at proxmox.com
Wed May 9 13:31:33 CEST 2018
also optimize indentation and squash patches
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
debian/patches/0001-add-pve-specific-js-code.patch | 210 +++++++++------------
.../0002-add-custom-fbresize-event-on-rfb.patch | 72 +++++++
...-change-scaling-when-toggling-fullscreen.patch} | 33 ++--
...dd-pve-style.patch => 0004-add-pve-style.patch} | 21 ++-
...vnc-logos.patch => 0005-remove-vnc-logos.patch} | 14 +-
...change-src-directory-for-images-js-files.patch} | 32 ++--
...mands.patch => 0007-add-pve-vnc-commands.patch} | 6 +-
...008-add-replaceable-snippets-in-vnc.html.patch} | 6 +-
debian/patches/0008-focus-canvas-after-load.patch | 43 -----
debian/patches/0009-decrease-animation-time.patch | 18 +-
debian/patches/0010-use-only-app.js.patch | 8 +-
...nd-height-to-vncproxy-call-in-console-tab.patch | 33 ----
...change-higlight-color-for-pressed-buttons.patch | 26 ---
debian/patches/series | 16 +-
14 files changed, 236 insertions(+), 302 deletions(-)
create mode 100644 debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
rename debian/patches/{0002-change-scaling-when-toggling-fullscreen.patch => 0003-change-scaling-when-toggling-fullscreen.patch} (55%)
rename debian/patches/{0003-add-pve-style.patch => 0004-add-pve-style.patch} (77%)
rename debian/patches/{0004-remove-vnc-logos.patch => 0005-remove-vnc-logos.patch} (90%)
rename debian/patches/{0005-change-src-directory-for-images-js-files.patch => 0006-change-src-directory-for-images-js-files.patch} (92%)
rename debian/patches/{0006-add-pve-vnc-commands.patch => 0007-add-pve-vnc-commands.patch} (91%)
rename debian/patches/{0007-add-replaceable-snippets-in-vnc.html.patch => 0008-add-replaceable-snippets-in-vnc.html.patch} (87%)
delete mode 100644 debian/patches/0008-focus-canvas-after-load.patch
delete mode 100644 debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
delete mode 100644 debian/patches/0012-change-higlight-color-for-pressed-buttons.patch
diff --git a/debian/patches/0001-add-pve-specific-js-code.patch b/debian/patches/0001-add-pve-specific-js-code.patch
index f4f5067..bae6bf6 100644
--- a/debian/patches/0001-add-pve-specific-js-code.patch
+++ b/debian/patches/0001-add-pve-specific-js-code.patch
@@ -1,7 +1,7 @@
-From ad6975daaeee0798955f1d8b36d567975f4cbae5 Mon Sep 17 00:00:00 2001
+From e9e4fe2eab135507fd6574b2f12ddc5c9d0a532b Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Tue, 13 Dec 2016 16:11:35 +0100
-Subject: [PATCH 1/9] add pve specific js code
+Subject: [PATCH 01/10] add pve specific js code
this adds a es6 module 'PVEUI' which we use for defining the pve related
methods (API2Request, etc.)
@@ -11,17 +11,17 @@ autoresizing, commandstoggle, etc.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
- app/pve.js | 417 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- app/ui.js | 95 ++++++++++----
- 2 files changed, 488 insertions(+), 24 deletions(-)
+ app/pve.js | 414 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ app/ui.js | 75 ++++++++---
+ 2 files changed, 475 insertions(+), 14 deletions(-)
create mode 100644 app/pve.js
diff --git a/app/pve.js b/app/pve.js
new file mode 100644
-index 0000000..668835a
+index 0000000..37858f5
--- /dev/null
+++ b/app/pve.js
-@@ -0,0 +1,417 @@
+@@ -0,0 +1,414 @@
+/*
+ * PVE Utility functions for noVNC
+ * Copyright (C) 2017 Proxmox GmbH
@@ -76,6 +76,13 @@ index 0000000..668835a
+ break;
+ }
+
++ if (this.resize == 'scale' &&
++ (this.consoletype === 'lxc' || this.consoletype === 'shell')) {
++ var size = this.getFBSize();
++ params.width = size.width;
++ params.height = size.height;
++ }
++
+ this.baseUrl = baseUrl;
+ this.url = url;
+ this.params = params;
@@ -341,10 +348,6 @@ index 0000000..668835a
+ el.classList.add('noVNC_hidden');
+ }
+ });
-+
-+ //edge/ie11 quirk
-+ var canvas = document.getElementById('noVNC_canvas');
-+ canvas.onclick = canvas.focus;
+ },
+
+ getFBSize: function() {
@@ -393,7 +396,6 @@ index 0000000..668835a
+
+ updateFBSize: function(rfb, width, height, clip) {
+ var me = this;
-+ console.log(arguments);
+ try {
+ // Note: window size must be even number for firefox
+ me.lastFBWidth = Math.floor((width + 1)/2)*2;
@@ -420,11 +422,6 @@ index 0000000..668835a
+ //console.log("try resize by " + offsetw + " " + offseth);
+ try {
+ window.resizeBy(offsetw, offseth);
-+ // wait a little an then fix the scrollbars
-+ // on chrome
-+ setTimeout(function() {
-+ me.UI.fixScrollbars();
-+ }, 100);
+ } catch (e) {
+ console.log('resizing did not work', e);
+ }
@@ -440,135 +437,126 @@ index 0000000..668835a
+ },
+};
diff --git a/app/ui.js b/app/ui.js
-index 73ad2b4..def0eda 100644
+index 2218d24..143cb60 100644
--- a/app/ui.js
+++ b/app/ui.js
-@@ -20,6 +20,7 @@ import keysyms from "../core/input/keysymdef.js";
+@@ -18,6 +18,7 @@ import Keyboard from "../core/input/keyboard.js";
import RFB from "../core/rfb.js";
import Display from "../core/display.js";
import * as WebUtil from "./webutil.js";
+import PVEUI from "./pve.js";
- const UI = {
+ var UI = {
-@@ -63,6 +64,7 @@ const UI = {
+@@ -59,6 +60,7 @@ var UI = {
// Render default UI and initialize settings menu
start: function(callback) {
-+ UI.PVE = new PVEUI(UI);
++ UI.PVE = new PVEUI(UI);
// Setup global variables first
UI.isSafari = (navigator.userAgent.indexOf('Safari') !== -1 &&
navigator.userAgent.indexOf('Chrome') === -1);
-@@ -95,6 +97,9 @@ const UI = {
+@@ -90,6 +92,9 @@ var UI = {
UI.addConnectionControlHandlers();
UI.addClipboardHandlers();
UI.addSettingsHandlers();
+
-+ // add pve specific event handlers
-+ UI.PVE.addPVEHandlers();
++ // add pve specific event handlers
++ UI.PVE.addPVEHandlers();
document.getElementById("noVNC_status")
.addEventListener('click', UI.hideStatus);
-@@ -103,11 +108,6 @@ const UI = {
+@@ -98,23 +103,19 @@ var UI = {
UI.openControlbar();
-- // Show the connect panel on first load unless autoconnecting
-- if (!autoconnect) {
-- UI.openConnectPanel();
-- }
--
- UI.updateViewClip();
++ UI.updateViewClip();
++
+ UI.updateVisualState('init');
- UI.updateVisualState();
-@@ -115,17 +115,13 @@ const UI = {
- document.getElementById('noVNC_setting_host').focus();
document.documentElement.classList.remove("noVNC_loading");
- var autoconnect = WebUtil.getConfigVar('autoconnect', false);
- if (autoconnect === 'true' || autoconnect == '1') {
- autoconnect = true;
-- UI.connect();
++ UI.PVE.pveStart(function() {
+ UI.connect();
- } else {
- autoconnect = false;
+- // Show the connect panel on first load unless autoconnecting
+- UI.openConnectPanel();
- }
-+ UI.PVE.pveStart(function() {
-+ UI.connect();
- if (typeof callback === "function") {
- callback(UI.rfb);
- }
-+ if (typeof callback === "function") {
-+ callback(UI.rfb);
-+ }
-+ });
++ if (typeof callback === "function") {
++ callback(UI.rfb);
++ }
++ });
},
initFullscreen: function() {
-@@ -170,10 +166,14 @@ const UI = {
+@@ -159,9 +160,13 @@ var UI = {
/* Populate the controls if defaults are provided in the URL */
UI.initSetting('host', window.location.hostname);
UI.initSetting('port', port);
- UI.initSetting('encrypt', (window.location.protocol === "https:"));
+ UI.initSetting('encrypt', true);
- UI.initSetting('cursor', !isTouchDevice);
- UI.initSetting('clip', false);
+ UI.initSetting('view_clip', false);
- UI.initSetting('resize', 'off');
-+ // we need updateSetting because
-+ // otherwise we load from browser storage
-+ // we want to overwrite the resize mode from url
-+ var resize = WebUtil.getQueryVar('resize');
-+ UI.updateSetting('resize', resize);
++ // we need updateSetting because
++ // otherwise we load from browser storage
++ // we want to overwrite the resize mode from url
++ var resize = WebUtil.getQueryVar('resize');
++ UI.updateSetting('resize', resize);
UI.initSetting('shared', true);
UI.initSetting('view_only', false);
UI.initSetting('path', 'websockify');
-@@ -434,6 +434,7 @@ const UI = {
+@@ -393,6 +398,9 @@ var UI = {
+ document.documentElement.classList.add("noVNC_connecting");
+ break;
case 'connected':
- UI.connected = true;
- UI.inhibit_reconnect = false;
-+ UI.pveAllowMigratedTest = true;
++ UI.connected = true;
++ UI.inhibit_reconnect = false;
++ UI.pveAllowMigratedTest = true;
document.documentElement.classList.add("noVNC_connected");
- if (rfb && rfb.get_encrypt()) {
- msg = _("Connected (encrypted) to ") + UI.desktopName;
-@@ -449,6 +450,10 @@ const UI = {
+ break;
+ case 'disconnecting':
+@@ -400,6 +408,11 @@ var UI = {
+ document.documentElement.classList.add("noVNC_disconnecting");
break;
case 'disconnected':
- UI.showStatus(_("Disconnected"));
-+ if (UI.pveAllowMigratedTest === true) {
-+ UI.pveAllowMigratedTest = false;
-+ UI.PVE.pve_detect_migrated_vm();
-+ }
++ UI.showStatus(_("Disconnected"));
++ if (UI.pveAllowMigratedTest === true) {
++ UI.pveAllowMigratedTest = false;
++ UI.PVE.pve_detect_migrated_vm();
++ }
break;
- default:
- msg = "Invalid UI state";
-@@ -861,6 +866,7 @@ const UI = {
- UI.closeXvpPanel();
+ case 'reconnecting':
+ transition_elem.textContent = _("Reconnecting...");
+@@ -813,6 +826,7 @@ var UI = {
+ UI.closePowerPanel();
UI.closeClipboardPanel();
UI.closeExtraKeys();
-+ UI.closePVECommandPanel();
++ UI.closePVECommandPanel();
},
/* ------^-------
-@@ -1033,9 +1039,15 @@ const UI = {
- password = WebUtil.getConfigVar('password');
+@@ -988,6 +1002,12 @@ var UI = {
+ UI.reconnect_password = password;
}
-- if (password === null) {
-- password = undefined;
-- }
-+ var password = document.getElementById('noVNC_password_input').value;
++ var password = document.getElementById('noVNC_password_input').value;
+
-+ if (!password) {
-+ password = WebUtil.getConfigVar('password');
-+ }
++ if (!password) {
++ password = WebUtil.getConfigVar('password');
++ }
+
-+ if (password === null) {
-+ password = undefined;
-+ }
-
- if ((!host) || (!port)) {
- var msg = _("Must set host and port");
-@@ -1608,9 +1620,36 @@ const UI = {
+ if (password === null) {
+ password = undefined;
+ }
+@@ -1567,9 +1587,36 @@ var UI = {
/* ------^-------
* /EXTRA KEYS
* ==============
@@ -577,63 +565,35 @@ index 73ad2b4..def0eda 100644
* ------v------*/
+ togglePVECommandPanel: function() {
-+ if (document.getElementById('pve_commands').classList.contains("noVNC_open")) {
-+ UI.closePVECommandPanel();
-+ } else {
-+ UI.openPVECommandPanel();
-+ }
++ if (document.getElementById('pve_commands').classList.contains("noVNC_open")) {
++ UI.closePVECommandPanel();
++ } else {
++ UI.openPVECommandPanel();
++ }
+ },
+
+ openPVECommandPanel: function() {
-+ var me = this;
-+ UI.closeAllPanels();
-+ UI.openControlbar();
++ var me = this;
++ UI.closeAllPanels();
++ UI.openControlbar();
+
-+ document.getElementById('pve_commands').classList.add("noVNC_open");
-+ document.getElementById('pve_commands_button').classList.add("noVNC_selected");
++ document.getElementById('pve_commands').classList.add("noVNC_open");
++ document.getElementById('pve_commands_button').classList.add("noVNC_selected");
+ },
+
+ closePVECommandPanel: function() {
-+ document.getElementById('pve_commands').classList.remove("noVNC_open");
-+ document.getElementById('pve_commands_button').classList.remove("noVNC_selected");
++ document.getElementById('pve_commands').classList.remove("noVNC_open");
++ document.getElementById('pve_commands_button').classList.remove("noVNC_selected");
+ },
+
+/* ------^-------
-+ * /PVE
++ * /PVE
+ * ==============
+ * MISC
+ * ------v------*/
setMouseButton: function(num) {
- var view_only = UI.rfb.get_view_only();
+ var view_only = UI.rfb.viewOnly;
if (UI.rfb && !view_only) {
-@@ -1658,8 +1697,16 @@ const UI = {
- },
-
- updateSessionSize: function(rfb, width, height) {
-- UI.updateViewClip();
-- UI.fixScrollbars();
-+ var resize = UI.getSetting('resize');
-+
-+ if (resize == 'null') {
-+ var clip = UI.getSetting('clip');
-+ UI.PVE.updateFBSize(rfb, width, height, clip);
-+ }
-+
-+ UI.applyResizeMode();
-+ UI.updateViewClip();
-+ UI.updateViewDrag();
- },
-
- fixScrollbars: function() {
-@@ -1704,7 +1751,7 @@ const UI = {
- },
-
- /* ------^-------
-- * /MISC
-+ * /MISC
- * ==============
- */
- };
--
2.11.0
diff --git a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
new file mode 100644
index 0000000..86ef08e
--- /dev/null
+++ b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
@@ -0,0 +1,72 @@
+From 5a456e52e6a1c9cb283187505bc09289a9fb3334 Mon Sep 17 00:00:00 2001
+From: Dominik Csapak <d.csapak at proxmox.com>
+Date: Wed, 9 May 2018 10:47:53 +0200
+Subject: [PATCH 02/10] add custom fbresize event on rfb
+
+this can be use to react to changes of the resolution, like resizing the
+window
+
+Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
+---
+ app/ui.js | 16 ++++++++++++++++
+ core/rfb.js | 10 ++++++++++
+ 2 files changed, 26 insertions(+)
+
+diff --git a/app/ui.js b/app/ui.js
+index 143cb60..b01fd5d 100644
+--- a/app/ui.js
++++ b/app/ui.js
+@@ -1047,6 +1047,7 @@ var UI = {
+ UI.rfb.addEventListener("clipboard", UI.clipboardReceive);
+ UI.rfb.addEventListener("bell", UI.bell);
+ UI.rfb.addEventListener("desktopname", UI.updateDesktopName);
++ UI.rfb.addEventListener("fbresize", UI.updateSessionSize);
+ UI.rfb.clipViewport = UI.getSetting('view_clip');
+ UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
+ UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
+@@ -1612,6 +1613,21 @@ var UI = {
+ document.getElementById('pve_commands_button').classList.remove("noVNC_selected");
+ },
+
++ updateSessionSize: function(e) {
++ var rfb = e.detail.rfb;
++ var width = e.detail.width;
++ var height = e.detail.height;
++ var resize = UI.getSetting('resize');
++
++ if (resize == 'null') {
++ var clip = UI.getSetting('view_clip');
++ UI.PVE.updateFBSize(rfb, width, height, clip);
++ }
++
++ UI.applyResizeMode();
++ UI.updateViewClip();
++ },
++
+ /* ------^-------
+ * /PVE
+ * ==============
+diff --git a/core/rfb.js b/core/rfb.js
+index 7c4e0c9..6a1ff85 100644
+--- a/core/rfb.js
++++ b/core/rfb.js
+@@ -1588,6 +1588,16 @@ RFB.prototype = {
+ this._updateClip();
+ this._updateScale();
+
++ // fbresize event
++ var event = new CustomEvent("fbresize", {
++ detail: {
++ rfb: this,
++ width: width,
++ height: height }
++ }
++ );
++ this.dispatchEvent(event);
++
+ this._timing.fbu_rt_start = (new Date()).getTime();
+ this._updateContinuousUpdates();
+ },
+--
+2.11.0
+
diff --git a/debian/patches/0002-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
similarity index 55%
rename from debian/patches/0002-change-scaling-when-toggling-fullscreen.patch
rename to debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
index 5bf888b..dec2248 100644
--- a/debian/patches/0002-change-scaling-when-toggling-fullscreen.patch
+++ b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
@@ -1,45 +1,44 @@
-From c1073cb0f19ebd64f6ee4b221b5aa06a2f8e5c99 Mon Sep 17 00:00:00 2001
+From 6abc6b0b278717584ff2452cbe8d1f448398a406 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Thu, 11 May 2017 10:34:10 +0200
-Subject: [PATCH 2/9] change scaling when toggling fullscreen
+Subject: [PATCH 03/10] change scaling when toggling fullscreen
when activating fullscreen, we change the scaling to 'scale',
and changing it back when leaving fullscreen
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
- app/ui.js | 11 +++++++++++
- 1 file changed, 11 insertions(+)
+ app/ui.js | 9 +++++++++
+ 1 file changed, 9 insertions(+)
diff --git a/app/ui.js b/app/ui.js
-index def0eda..d4b0291 100644
+index b01fd5d..d35be49 100644
--- a/app/ui.js
+++ b/app/ui.js
-@@ -1174,6 +1174,15 @@ const UI = {
+@@ -1210,6 +1210,12 @@ var UI = {
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
+
-+ // when changing from fullscreen to window,
-+ // re enable auto resize
-+ if (WebUtil.getQueryVar('resize') === null) {
-+ UI.updateSetting('resize', null);
-+ setTimeout(function() {
-+ UI.fixScrollbars();
-+ }, 100);
-+ }
++ // when changing from fullscreen to window,
++ // re enable auto resize
++ if (WebUtil.getQueryVar('resize') === null) {
++ UI.updateSetting('resize', null);
++ }
} else {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
-@@ -1184,6 +1193,8 @@ const UI = {
+@@ -1220,7 +1226,10 @@ var UI = {
} else if (document.body.msRequestFullscreen) {
document.body.msRequestFullscreen();
}
-+ // we want scaling in fullscreen mode
-+ UI.updateSetting('resize', 'scale');
++ // we want scaling in fullscreen mode
++ UI.updateSetting('resize', 'scale');
}
++ UI.applyResizeMode();
UI.enableDisableViewClip();
UI.updateFullscreenButton();
+ },
--
2.11.0
diff --git a/debian/patches/0003-add-pve-style.patch b/debian/patches/0004-add-pve-style.patch
similarity index 77%
rename from debian/patches/0003-add-pve-style.patch
rename to debian/patches/0004-add-pve-style.patch
index 394f8dd..a5f2050 100644
--- a/debian/patches/0003-add-pve-style.patch
+++ b/debian/patches/0004-add-pve-style.patch
@@ -1,7 +1,7 @@
-From 1cdfeafd561bfe4d9acb7ef8a838d82c64f9c1e5 Mon Sep 17 00:00:00 2001
+From 5d8fb2485e4863d561481ea7d51e36f8e0be1d2b Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Tue, 13 Dec 2016 16:03:41 +0100
-Subject: [PATCH 3/9] add pve style
+Subject: [PATCH 04/10] add pve style
this adds the custom pve style (based on black.css)
@@ -10,17 +10,17 @@ and fix the z-index of the connect overlay
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
- app/styles/pve.css | 37 +++++++++++++++++++++++++++++++++++++
+ app/styles/pve.css | 42 ++++++++++++++++++++++++++++++++++++++++++
vnc.html | 1 +
- 2 files changed, 38 insertions(+)
+ 2 files changed, 43 insertions(+)
create mode 100644 app/styles/pve.css
diff --git a/app/styles/pve.css b/app/styles/pve.css
new file mode 100644
-index 0000000..35002fe
+index 0000000..eaeb5cb
--- /dev/null
+++ b/app/styles/pve.css
-@@ -0,0 +1,37 @@
+@@ -0,0 +1,42 @@
+/*
+ * noVNC black CSS
+ * Copyright (C) 2012 Joel Martin
@@ -58,11 +58,16 @@ index 0000000..35002fe
+#noVNC_connect_button {
+ display: none;
+}
++
++:root:not(.noVNC_touch) .noVNC_button.noVNC_selected:hover {
++ border-color: rgba(0, 0, 0, 0.4);
++ background: #5BA8DF;
++}
diff --git a/vnc.html b/vnc.html
-index 6cb4be4..98a9952 100644
+index 701714c..63d7181 100644
--- a/vnc.html
+++ b/vnc.html
-@@ -53,6 +53,7 @@
+@@ -55,6 +55,7 @@
<!-- Stylesheets -->
<link rel="stylesheet" href="app/styles/base.css" />
diff --git a/debian/patches/0004-remove-vnc-logos.patch b/debian/patches/0005-remove-vnc-logos.patch
similarity index 90%
rename from debian/patches/0004-remove-vnc-logos.patch
rename to debian/patches/0005-remove-vnc-logos.patch
index 2577119..9a0cc43 100644
--- a/debian/patches/0004-remove-vnc-logos.patch
+++ b/debian/patches/0005-remove-vnc-logos.patch
@@ -1,20 +1,20 @@
-From a28b283a224990e1b46f304d9a2067afa7633d63 Mon Sep 17 00:00:00 2001
+From 761e67e803bfcf196cc2229ec451adaee0beb61a Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Fri, 20 Jan 2017 10:35:05 +0100
-Subject: [PATCH 4/9] remove vnc logos
+Subject: [PATCH 05/10] remove vnc logos
to show the pve icon instead
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
- vnc.html | 24 ------------------------
- 1 file changed, 24 deletions(-)
+ vnc.html | 26 --------------------------
+ 1 file changed, 26 deletions(-)
diff --git a/vnc.html b/vnc.html
-index 98a9952..cd8e594 100644
+index 63d7181..60727e4 100644
--- a/vnc.html
+++ b/vnc.html
-@@ -23,34 +23,10 @@
+@@ -23,36 +23,10 @@
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
@@ -32,7 +32,9 @@ index 98a9952..cd8e594 100644
- <link rel="icon" sizes="144x144" type="image/png" href="app/images/icons/novnc-144x144.png">
- <link rel="icon" sizes="152x152" type="image/png" href="app/images/icons/novnc-152x152.png">
- <link rel="icon" sizes="192x192" type="image/png" href="app/images/icons/novnc-192x192.png">
+- <!-- Firefox currently mishandles SVG, see #1419039
- <link rel="icon" sizes="any" type="image/svg+xml" href="app/images/icons/novnc-icon.svg">
+- -->
- <!-- Repeated last so that legacy handling will pick this -->
- <link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/novnc-16x16.png">
-
diff --git a/debian/patches/0005-change-src-directory-for-images-js-files.patch b/debian/patches/0006-change-src-directory-for-images-js-files.patch
similarity index 92%
rename from debian/patches/0005-change-src-directory-for-images-js-files.patch
rename to debian/patches/0006-change-src-directory-for-images-js-files.patch
index 43847c8..60f6ab6 100644
--- a/debian/patches/0005-change-src-directory-for-images-js-files.patch
+++ b/debian/patches/0006-change-src-directory-for-images-js-files.patch
@@ -1,7 +1,7 @@
-From 0b7322fc05361366fc4e24e6d5b9d8e2254ace40 Mon Sep 17 00:00:00 2001
+From 87486c038db7ddb212f995c70edf13dc1e8783cd Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Tue, 17 Jan 2017 17:24:03 +0100
-Subject: [PATCH 5/9] change src directory for images/js files
+Subject: [PATCH 06/10] change src directory for images/js files
since they will be in /novnc/
also change the directory in the build script
@@ -14,11 +14,11 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/app/ui.js b/app/ui.js
-index d4b0291..d32c789 100644
+index d35be49..d64389d 100644
--- a/app/ui.js
+++ b/app/ui.js
-@@ -1771,7 +1771,7 @@ const UI = {
- var LINGUAS = ["de", "el", "nl", "sv"];
+@@ -1725,7 +1725,7 @@ var UI = {
+ var LINGUAS = ["de", "el", "es", "nl", "pl", "sv", "tr", "zh"];
l10n.setup(LINGUAS);
if (l10n.language !== "en" && l10n.dictionary === undefined) {
- WebUtil.fetchJSON('app/locale/' + l10n.language + '.json', function (translations) {
@@ -40,7 +40,7 @@ index 990fb4d..0f44e1c 100644
noCopyOverride: () => {},
},
diff --git a/vnc.html b/vnc.html
-index cd8e594..23fc0e4 100644
+index 60727e4..fa66d6f 100644
--- a/vnc.html
+++ b/vnc.html
@@ -28,7 +28,7 @@
@@ -76,8 +76,8 @@ index cd8e594..23fc0e4 100644
});
</script>
<!-- actual script modules -->
-- <script type="module" src="app/ui.js"></script>
-+ <script type="module" src="/novnc/app/ui.js"></script>
+- <script type="module" crossorigin="anonymous" src="app/ui.js"></script>
++ <script type="module" crossorigin="anonymous" src="/novnc/app/ui.js"></script>
<!-- end scripts -->
</head>
@@ -146,19 +146,19 @@ index cd8e594..23fc0e4 100644
@@ -130,13 +130,13 @@
</div>
- <!-- XVP Shutdown/Reboot -->
+ <!-- Shutdown/Reboot -->
- <input type="image" alt="Shutdown/Reboot" src="app/images/power.svg"
+ <input type="image" alt="Shutdown/Reboot" src="/novnc/app/images/power.svg"
- id="noVNC_xvp_button" class="noVNC_button"
+ id="noVNC_power_button" class="noVNC_button"
title="Shutdown/Reboot..." />
<div class="noVNC_vcenter">
- <div id="noVNC_xvp" class="noVNC_panel">
+ <div id="noVNC_power" class="noVNC_panel">
<div class="noVNC_heading">
- <img src="app/images/power.svg"> Power
+ <img src="/novnc/app/images/power.svg"> Power
</div>
- <input type="button" id="noVNC_xvp_shutdown_button" value="Shutdown" />
- <input type="button" id="noVNC_xvp_reboot_button" value="Reboot" />
+ <input type="button" id="noVNC_shutdown_button" value="Shutdown" />
+ <input type="button" id="noVNC_reboot_button" value="Reboot" />
@@ -145,13 +145,13 @@
</div>
@@ -198,7 +198,7 @@ index cd8e594..23fc0e4 100644
</li>
<li>
<label><input id="noVNC_setting_shared" type="checkbox" /> Shared Mode</label>
-@@ -249,7 +249,7 @@
+@@ -244,7 +244,7 @@
</div>
<!-- Connection Controls -->
@@ -207,7 +207,7 @@ index cd8e594..23fc0e4 100644
id="noVNC_disconnect_button" class="noVNC_button"
title="Disconnect" />
-@@ -266,7 +266,7 @@
+@@ -263,7 +263,7 @@
<div id="noVNC_connect_dlg">
<div class="noVNC_logo" translate="no"><span>no</span>VNC</div>
<div id="noVNC_connect_button"><div>
@@ -216,7 +216,7 @@ index cd8e594..23fc0e4 100644
</div></div>
</div>
</div>
-@@ -314,8 +314,8 @@
+@@ -304,8 +304,8 @@
</div>
<audio id="noVNC_bell">
diff --git a/debian/patches/0006-add-pve-vnc-commands.patch b/debian/patches/0007-add-pve-vnc-commands.patch
similarity index 91%
rename from debian/patches/0006-add-pve-vnc-commands.patch
rename to debian/patches/0007-add-pve-vnc-commands.patch
index 3b83959..b81852a 100644
--- a/debian/patches/0006-add-pve-vnc-commands.patch
+++ b/debian/patches/0007-add-pve-vnc-commands.patch
@@ -1,7 +1,7 @@
-From 1a042fcad1f9242cafbb589a1da5b8b270e8b8bb Mon Sep 17 00:00:00 2001
+From d83521eab33ef32d35f4ea8ada73585bad4265a4 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Fri, 20 Jan 2017 10:35:43 +0100
-Subject: [PATCH 6/9] add pve vnc commands
+Subject: [PATCH 07/10] add pve vnc commands
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
@@ -9,7 +9,7 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
1 file changed, 20 insertions(+)
diff --git a/vnc.html b/vnc.html
-index 23fc0e4..e789d04 100644
+index fa66d6f..8c3d9d9 100644
--- a/vnc.html
+++ b/vnc.html
@@ -165,6 +165,26 @@
diff --git a/debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch b/debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
similarity index 87%
rename from debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch
rename to debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
index 6ea98a1..41b3ee2 100644
--- a/debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch
+++ b/debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
@@ -1,7 +1,7 @@
-From c3d885b78fd816201ed485eb7a681ce1fcf3a122 Mon Sep 17 00:00:00 2001
+From f56b6fe825b776c30e445d2319488bec63551b8f Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Fri, 20 Jan 2017 10:16:09 +0100
-Subject: [PATCH 7/9] add replaceable snippets in vnc.html
+Subject: [PATCH 08/10] 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 at proxmox.com>
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/vnc.html b/vnc.html
-index e789d04..1423f78 100644
+index 8c3d9d9..a139e26 100644
--- a/vnc.html
+++ b/vnc.html
@@ -15,7 +15,7 @@
diff --git a/debian/patches/0008-focus-canvas-after-load.patch b/debian/patches/0008-focus-canvas-after-load.patch
deleted file mode 100644
index 4c38bbb..0000000
--- a/debian/patches/0008-focus-canvas-after-load.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b97c51d6a2ca70a5e60209cd7ab16563455b8d13 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak at proxmox.com>
-Date: Wed, 14 Dec 2016 08:40:02 +0100
-Subject: [PATCH 8/9] focus canvas after load
-
-or else in some browsers, the canvas does not get the focus after
-loading in an iframe
-
-Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
----
- app/ui.js | 2 ++
- vnc.html | 2 +-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/app/ui.js b/app/ui.js
-index d32c789..ed2897b 100644
---- a/app/ui.js
-+++ b/app/ui.js
-@@ -442,6 +442,8 @@ const UI = {
- msg = _("Connected (unencrypted) to ") + UI.desktopName;
- }
- UI.showStatus(msg);
-+ rfb.get_keyboard().set_focused(true);
-+ document.getElementById("noVNC_canvas").focus();
- break;
- case 'disconnecting':
- UI.connected = false;
-diff --git a/vnc.html b/vnc.html
-index 1423f78..ff70e0c 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -332,7 +332,7 @@
- autocorrect="off" autocomplete="off" spellcheck="false"
- mozactionhint="Enter"></textarea>
-
-- <canvas id="noVNC_canvas" width="0" height="0">
-+ <canvas id="noVNC_canvas" width="0" height="0" tabindex="0">
- Canvas not supported.
- </canvas>
- </div>
---
-2.11.0
-
diff --git a/debian/patches/0009-decrease-animation-time.patch b/debian/patches/0009-decrease-animation-time.patch
index ff9ba1a..95d94a3 100644
--- a/debian/patches/0009-decrease-animation-time.patch
+++ b/debian/patches/0009-decrease-animation-time.patch
@@ -1,7 +1,7 @@
-From 3f13289a9f895b1ba86ad61ed085390bffda3e3a Mon Sep 17 00:00:00 2001
+From d98b4392c64493316f3b7b899772e4411b346ee0 Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Fri, 20 Jan 2017 10:55:49 +0100
-Subject: [PATCH 9/9] decrease animation time
+Subject: [PATCH 09/10] decrease animation time
because 0.5s is too long
@@ -11,10 +11,10 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/app/styles/base.css b/app/styles/base.css
-index ce31cf7..6db4467 100644
+index 344db9b..6e0d8d6 100644
--- a/app/styles/base.css
+++ b/app/styles/base.css
-@@ -283,7 +283,7 @@ select:active {
+@@ -285,7 +285,7 @@ select:active {
position: fixed;
z-index: 10;
@@ -23,7 +23,7 @@ index ce31cf7..6db4467 100644
/* Edge misrenders animations wihthout this */
transform: translateX(0);
-@@ -300,7 +300,7 @@ select:active {
+@@ -302,7 +302,7 @@ select:active {
position: relative;
left: -100%;
@@ -32,7 +32,7 @@ index ce31cf7..6db4467 100644
background-color: rgb(110, 132, 163);
border-radius: 0 10px 10px 0;
-@@ -318,7 +318,7 @@ select:active {
+@@ -320,7 +320,7 @@ select:active {
height: 100%;
width: 30px;
left: -30px;
@@ -41,7 +41,7 @@ index ce31cf7..6db4467 100644
}
#noVNC_control_bar.noVNC_open::before {
box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
-@@ -352,7 +352,7 @@ select:active {
+@@ -354,7 +354,7 @@ select:active {
}
#noVNC_control_bar_handle:after {
content: "";
@@ -50,7 +50,7 @@ index ce31cf7..6db4467 100644
background: url("../images/handle.svg");
position: absolute;
top: 22px; /* (50px-6px)/2 */
-@@ -440,7 +440,7 @@ select:active {
+@@ -476,7 +476,7 @@ select:active {
.noVNC_panel {
transform: translateX(25px);
@@ -59,7 +59,7 @@ index ce31cf7..6db4467 100644
max-height: 100vh; /* Chrome is buggy with 100% */
overflow-x: hidden;
-@@ -617,7 +617,7 @@ select:active {
+@@ -653,7 +653,7 @@ select:active {
cursor: pointer;
diff --git a/debian/patches/0010-use-only-app.js.patch b/debian/patches/0010-use-only-app.js.patch
index e225250..bbba831 100644
--- a/debian/patches/0010-use-only-app.js.patch
+++ b/debian/patches/0010-use-only-app.js.patch
@@ -1,4 +1,4 @@
-From 6d3945c7c0b680a871d789215659f04e42acd6e7 Mon Sep 17 00:00:00 2001
+From 821a87411fd75bc1137e99250689f21d820e49ed Mon Sep 17 00:00:00 2001
From: Dominik Csapak <d.csapak at proxmox.com>
Date: Tue, 16 May 2017 10:36:15 +0200
Subject: [PATCH 10/10] use only app.js
@@ -12,7 +12,7 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/vnc.html b/vnc.html
-index ff70e0c..40c726b 100644
+index a139e26..46d09d7 100644
--- a/vnc.html
+++ b/vnc.html
@@ -46,22 +46,7 @@
@@ -34,8 +34,8 @@ index ff70e0c..40c726b 100644
- });
- </script>
- <!-- actual script modules -->
-- <script type="module" src="/novnc/app/ui.js"></script>
-+ <script src="/novnc/app.js"></script>
+- <script type="module" crossorigin="anonymous" src="/novnc/app/ui.js"></script>
++ <script crossorigin=anonymous" src="/novnc/app.js"></script>
<!-- end scripts -->
</head>
diff --git a/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch b/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
deleted file mode 100644
index ed1f4c3..0000000
--- a/debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From d3da00817202a762de5bcd7cf14c38dceb30a301 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak at proxmox.com>
-Date: Fri, 19 May 2017 08:53:56 +0200
-Subject: [PATCH 11/11] add width and height to vncproxy call in console tab
-
-to set the resolution we want
-
-Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
----
- app/pve.js | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/app/pve.js b/app/pve.js
-index 668835a..c10df4e 100644
---- a/app/pve.js
-+++ b/app/pve.js
-@@ -52,6 +52,13 @@ export default function PVEUI(UI){
- break;
- }
-
-+ if (this.resize == 'scale' &&
-+ (this.consoletype === 'lxc' || this.consoletype === 'shell')) {
-+ var size = this.getFBSize();
-+ params.width = size.width;
-+ params.height = size.height;
-+ }
-+
- this.baseUrl = baseUrl;
- this.url = url;
- this.params = params;
---
-2.11.0
-
diff --git a/debian/patches/0012-change-higlight-color-for-pressed-buttons.patch b/debian/patches/0012-change-higlight-color-for-pressed-buttons.patch
deleted file mode 100644
index 9e7af7d..0000000
--- a/debian/patches/0012-change-higlight-color-for-pressed-buttons.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 486e178afc6db131a0b24b18442e5b9fb04f37b0 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak at proxmox.com>
-Date: Tue, 6 Jun 2017 12:03:49 +0200
-Subject: [PATCH 12/12] change higlight color for pressed buttons
-
-Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
----
- app/styles/pve.css | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/app/styles/pve.css b/app/styles/pve.css
-index 35002fe..eaeb5cb 100644
---- a/app/styles/pve.css
-+++ b/app/styles/pve.css
-@@ -35,3 +35,8 @@
- #noVNC_connect_button {
- display: none;
- }
-+
-+:root:not(.noVNC_touch) .noVNC_button.noVNC_selected:hover {
-+ border-color: rgba(0, 0, 0, 0.4);
-+ background: #5BA8DF;
-+}
---
-2.11.0
-
diff --git a/debian/patches/series b/debian/patches/series
index 295a899..de6890a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,12 +1,10 @@
0001-add-pve-specific-js-code.patch
-0002-change-scaling-when-toggling-fullscreen.patch
-0003-add-pve-style.patch
-0004-remove-vnc-logos.patch
-0005-change-src-directory-for-images-js-files.patch
-0006-add-pve-vnc-commands.patch
-0007-add-replaceable-snippets-in-vnc.html.patch
-0008-focus-canvas-after-load.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
+0007-add-pve-vnc-commands.patch
+0008-add-replaceable-snippets-in-vnc.html.patch
0009-decrease-animation-time.patch
0010-use-only-app.js.patch
-0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch
-0012-change-higlight-color-for-pressed-buttons.patch
--
2.11.0
More information about the pve-devel
mailing list