]> git.proxmox.com Git - novnc-pve.git/commitdiff
rebase novnc patches on 1.0.0
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 9 May 2018 11:31:33 +0000 (13:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 May 2018 12:52:41 +0000 (14:52 +0200)
also optimize indentation and squash patches

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
20 files changed:
debian/patches/0001-add-pve-specific-js-code.patch
debian/patches/0002-add-custom-fbresize-event-on-rfb.patch [new file with mode: 0644]
debian/patches/0002-change-scaling-when-toggling-fullscreen.patch [deleted file]
debian/patches/0003-add-pve-style.patch [deleted file]
debian/patches/0003-change-scaling-when-toggling-fullscreen.patch [new file with mode: 0644]
debian/patches/0004-add-pve-style.patch [new file with mode: 0644]
debian/patches/0004-remove-vnc-logos.patch [deleted file]
debian/patches/0005-change-src-directory-for-images-js-files.patch [deleted file]
debian/patches/0005-remove-vnc-logos.patch [new file with mode: 0644]
debian/patches/0006-add-pve-vnc-commands.patch [deleted file]
debian/patches/0006-change-src-directory-for-images-js-files.patch [new file with mode: 0644]
debian/patches/0007-add-pve-vnc-commands.patch [new file with mode: 0644]
debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch [deleted file]
debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch [new file with mode: 0644]
debian/patches/0008-focus-canvas-after-load.patch [deleted file]
debian/patches/0009-decrease-animation-time.patch
debian/patches/0010-use-only-app.js.patch
debian/patches/0011-add-width-and-height-to-vncproxy-call-in-console-tab.patch [deleted file]
debian/patches/0012-change-higlight-color-for-pressed-buttons.patch [deleted file]
debian/patches/series

index f4f5067db059a7aa35d32140f7bdcb7978858ea4..bae6bf6bf47c1d31dee386487a3dad4fe6e68c67 100644 (file)
@@ -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@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@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 (file)
index 0000000..86ef08e
--- /dev/null
@@ -0,0 +1,72 @@
+From 5a456e52e6a1c9cb283187505bc09289a9fb3334 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/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@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/0002-change-scaling-when-toggling-fullscreen.patch
deleted file mode 100644 (file)
index 5bf888b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From c1073cb0f19ebd64f6ee4b221b5aa06a2f8e5c99 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 2/9] 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@proxmox.com>
----
- app/ui.js | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/app/ui.js b/app/ui.js
-index def0eda..d4b0291 100644
---- a/app/ui.js
-+++ b/app/ui.js
-@@ -1174,6 +1174,15 @@ const 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);
-+          }
-         } else {
-             if (document.documentElement.requestFullscreen) {
-                 document.documentElement.requestFullscreen();
-@@ -1184,6 +1193,8 @@ const UI = {
-             } else if (document.body.msRequestFullscreen) {
-                 document.body.msRequestFullscreen();
-             }
-+          // we want scaling in fullscreen mode
-+          UI.updateSetting('resize', 'scale');
-         }
-         UI.enableDisableViewClip();
-         UI.updateFullscreenButton();
--- 
-2.11.0
-
diff --git a/debian/patches/0003-add-pve-style.patch b/debian/patches/0003-add-pve-style.patch
deleted file mode 100644 (file)
index 394f8dd..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-From 1cdfeafd561bfe4d9acb7ef8a838d82c64f9c1e5 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 3/9] add pve style
-
-this adds the custom pve style (based on black.css)
-
-we hide the connect button, and add custom colors,
-and fix the z-index of the connect overlay
-
-Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
----
- app/styles/pve.css | 37 +++++++++++++++++++++++++++++++++++++
- vnc.html           |  1 +
- 2 files changed, 38 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
---- /dev/null
-+++ b/app/styles/pve.css
-@@ -0,0 +1,37 @@
-+/*
-+ * noVNC black CSS
-+ * Copyright (C) 2012 Joel Martin
-+ * Copyright (C) 2013 Samuel Mannehed for Cendio AB
-+ * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
-+ * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
-+ */
-+
-+.noVNC_panel {
-+    border: 0px;
-+    background:#4c4c4c;;
-+    color:#fff;
-+}
-+
-+#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading {
-+    background: #4c4c4c;
-+}
-+
-+.noVNC_button.noVNC_selected {
-+    background: #3892d4;
-+}
-+
-+#pve_commands > input[type=button] {
-+    width: 100%;
-+}
-+
-+#noVNC_canvas:focus {
-+    outline: none;
-+}
-+
-+#noVNC_transition {
-+    z-index: 0;
-+}
-+
-+#noVNC_connect_button {
-+    display: none;
-+}
-diff --git a/vnc.html b/vnc.html
-index 6cb4be4..98a9952 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -53,6 +53,7 @@
-     <!-- Stylesheets -->
-     <link rel="stylesheet" href="app/styles/base.css" />
-+    <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
-     <!--
-     <script type='text/javascript'
--- 
-2.11.0
-
diff --git a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
new file mode 100644 (file)
index 0000000..dec2248
--- /dev/null
@@ -0,0 +1,44 @@
+From 6abc6b0b278717584ff2452cbe8d1f448398a406 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/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@proxmox.com>
+---
+ app/ui.js | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/app/ui.js b/app/ui.js
+index b01fd5d..d35be49 100644
+--- a/app/ui.js
++++ b/app/ui.js
+@@ -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);
++            }
+         } else {
+             if (document.documentElement.requestFullscreen) {
+                 document.documentElement.requestFullscreen();
+@@ -1220,7 +1226,10 @@ var UI = {
+             } else if (document.body.msRequestFullscreen) {
+                 document.body.msRequestFullscreen();
+             }
++            // we want scaling in fullscreen mode
++            UI.updateSetting('resize', 'scale');
+         }
++        UI.applyResizeMode();
+         UI.enableDisableViewClip();
+         UI.updateFullscreenButton();
+     },
+-- 
+2.11.0
+
diff --git a/debian/patches/0004-add-pve-style.patch b/debian/patches/0004-add-pve-style.patch
new file mode 100644 (file)
index 0000000..a5f2050
--- /dev/null
@@ -0,0 +1,80 @@
+From 5d8fb2485e4863d561481ea7d51e36f8e0be1d2b 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/10] add pve style
+
+this adds the custom pve style (based on black.css)
+
+we hide the connect button, and add custom colors,
+and fix the z-index of the connect overlay
+
+Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+---
+ app/styles/pve.css | 42 ++++++++++++++++++++++++++++++++++++++++++
+ vnc.html           |  1 +
+ 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..eaeb5cb
+--- /dev/null
++++ b/app/styles/pve.css
+@@ -0,0 +1,42 @@
++/*
++ * noVNC black CSS
++ * Copyright (C) 2012 Joel Martin
++ * Copyright (C) 2013 Samuel Mannehed for Cendio AB
++ * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
++ * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
++ */
++
++.noVNC_panel {
++    border: 0px;
++    background:#4c4c4c;;
++    color:#fff;
++}
++
++#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading {
++    background: #4c4c4c;
++}
++
++.noVNC_button.noVNC_selected {
++    background: #3892d4;
++}
++
++#pve_commands > input[type=button] {
++    width: 100%;
++}
++
++#noVNC_canvas:focus {
++    outline: none;
++}
++
++#noVNC_transition {
++    z-index: 0;
++}
++
++#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 701714c..63d7181 100644
+--- a/vnc.html
++++ b/vnc.html
+@@ -55,6 +55,7 @@
+     <!-- Stylesheets -->
+     <link rel="stylesheet" href="app/styles/base.css" />
++    <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
+     <!--
+     <script type='text/javascript'
+-- 
+2.11.0
+
diff --git a/debian/patches/0004-remove-vnc-logos.patch b/debian/patches/0004-remove-vnc-logos.patch
deleted file mode 100644 (file)
index 2577119..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-From a28b283a224990e1b46f304d9a2067afa7633d63 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 4/9] remove vnc logos
-
-to show the pve icon instead
-
-Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
----
- vnc.html | 24 ------------------------
- 1 file changed, 24 deletions(-)
-
-diff --git a/vnc.html b/vnc.html
-index 98a9952..cd8e594 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -23,34 +23,10 @@
-                 Remove this if you use the .htaccess -->
-     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
--    <!-- Icons (see Makefile for what the sizes are for) -->
--    <link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/novnc-16x16.png">
--    <link rel="icon" sizes="24x24" type="image/png" href="app/images/icons/novnc-24x24.png">
--    <link rel="icon" sizes="32x32" type="image/png" href="app/images/icons/novnc-32x32.png">
--    <link rel="icon" sizes="48x48" type="image/png" href="app/images/icons/novnc-48x48.png">
--    <link rel="icon" sizes="60x60" type="image/png" href="app/images/icons/novnc-60x60.png">
--    <link rel="icon" sizes="64x64" type="image/png" href="app/images/icons/novnc-64x64.png">
--    <link rel="icon" sizes="72x72" type="image/png" href="app/images/icons/novnc-72x72.png">
--    <link rel="icon" sizes="76x76" type="image/png" href="app/images/icons/novnc-76x76.png">
--    <link rel="icon" sizes="96x96" type="image/png" href="app/images/icons/novnc-96x96.png">
--    <link rel="icon" sizes="120x120" type="image/png" href="app/images/icons/novnc-120x120.png">
--    <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">
--    <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">
--
-     <!-- Apple iOS Safari settings -->
-     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
-     <meta name="apple-mobile-web-app-capable" content="yes" />
-     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
--    <!-- Home Screen Icons (favourites and bookmarks use the normal icons) -->
--    <link rel="apple-touch-icon" sizes="60x60" type="image/png" href="app/images/icons/novnc-60x60.png">
--    <link rel="apple-touch-icon" sizes="76x76" type="image/png" href="app/images/icons/novnc-76x76.png">
--    <link rel="apple-touch-icon" sizes="120x120" type="image/png" href="app/images/icons/novnc-120x120.png">
--    <link rel="apple-touch-icon" sizes="152x152" type="image/png" href="app/images/icons/novnc-152x152.png">
--
-     <!-- Stylesheets -->
-     <link rel="stylesheet" href="app/styles/base.css" />
-     <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
--- 
-2.11.0
-
diff --git a/debian/patches/0005-change-src-directory-for-images-js-files.patch b/debian/patches/0005-change-src-directory-for-images-js-files.patch
deleted file mode 100644 (file)
index 43847c8..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-From 0b7322fc05361366fc4e24e6d5b9d8e2254ace40 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 5/9] change src directory for images/js files
-
-since they will be in /novnc/
-also change the directory in the build script
-
-Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
----
- app/ui.js                    |  2 +-
- utils/use_require_helpers.js |  2 +-
- vnc.html                     | 56 ++++++++++++++++++++++----------------------
- 3 files changed, 30 insertions(+), 30 deletions(-)
-
-diff --git a/app/ui.js b/app/ui.js
-index d4b0291..d32c789 100644
---- a/app/ui.js
-+++ b/app/ui.js
-@@ -1771,7 +1771,7 @@ const UI = {
- var LINGUAS = ["de", "el", "nl", "sv"];
- l10n.setup(LINGUAS);
- if (l10n.language !== "en" && l10n.dictionary === undefined) {
--    WebUtil.fetchJSON('app/locale/' + l10n.language + '.json', function (translations) {
-+    WebUtil.fetchJSON('/novnc/app/locale/' + l10n.language + '.json', function (translations) {
-         l10n.dictionary = translations;
-         // wait for translations to load before loading the UI
-diff --git a/utils/use_require_helpers.js b/utils/use_require_helpers.js
-index 990fb4d..0f44e1c 100644
---- a/utils/use_require_helpers.js
-+++ b/utils/use_require_helpers.js
-@@ -22,7 +22,7 @@ module.exports = {
-             var browserify = require('browserify');
-             var b = browserify(path.join(base_out_path, 'app/ui.js'), {});
-             b.bundle().pipe(fs.createWriteStream(out_path));
--            return `<script src="${path.relative(base_out_path, out_path)}"></script>`;
-+            return `<script src="/novnc/${path.relative(base_out_path, out_path)}"></script>`;
-         },
-         noCopyOverride: () => {},
-     },
-diff --git a/vnc.html b/vnc.html
-index cd8e594..23fc0e4 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -28,7 +28,7 @@
-     <meta name="apple-mobile-web-app-capable" content="yes" />
-     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
-     <!-- Stylesheets -->
--    <link rel="stylesheet" href="app/styles/base.css" />
-+    <link rel="stylesheet" href="/novnc/app/styles/base.css" />
-     <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
-     <!--
-@@ -37,11 +37,11 @@
-     -->
-     <!-- this is included as a normal file in order to catch script-loading errors as well -->
--    <script type="text/javascript" src="app/error-handler.js"></script>
-+    <script type="text/javascript" src="/novnc/app/error-handler.js"></script>
-     <!-- begin scripts -->
-     <!-- promise polyfills promises for IE11 -->
--    <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;
-@@ -50,12 +50,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>
-     <!-- actual script modules -->
--    <script type="module" src="app/ui.js"></script>
-+    <script type="module" src="/novnc/app/ui.js"></script>
-     <!-- end scripts -->
- </head>
-@@ -80,49 +80,49 @@
-             <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"
-                 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"
-                     value="Keyboard" 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="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>
-@@ -130,13 +130,13 @@
-             </div>
-             <!-- XVP 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"
-                 title="Shutdown/Reboot..." />
-             <div class="noVNC_vcenter">
-             <div id="noVNC_xvp" 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" />
-@@ -145,13 +145,13 @@
-             </div>
-             <!-- Clipboard -->
--            <input type="image" alt="Clipboard" src="app/images/clipboard.svg"
-+            <input type="image" alt="Clipboard" src="/novnc/app/images/clipboard.svg"
-                 id="noVNC_clipboard_button" class="noVNC_button"
-                 title="Clipboard" />
-             <div class="noVNC_vcenter">
-             <div id="noVNC_clipboard" class="noVNC_panel">
-                 <div class="noVNC_heading">
--                    <img src="app/images/clipboard.svg"> Clipboard
-+                    <img src="/novnc/app/images/clipboard.svg"> Clipboard
-                 </div>
-                 <textarea id="noVNC_clipboard_text" rows=5></textarea>
-                 <br />
-@@ -161,19 +161,19 @@
-             </div>
-             <!-- Toggle fullscreen -->
--            <input type="image" alt="Fullscreen" src="app/images/fullscreen.svg"
-+            <input type="image" alt="Fullscreen" src="/novnc/app/images/fullscreen.svg"
-                 id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
-                 title="Fullscreen" />
-             <!-- Settings -->
--            <input type="image" alt="Settings" src="app/images/settings.svg"
-+            <input type="image" alt="Settings" src="/novnc/app/images/settings.svg"
-                 id="noVNC_settings_button" class="noVNC_button"
-                 title="Settings" />
-             <div class="noVNC_vcenter">
-             <div id="noVNC_settings" class="noVNC_panel">
-                 <ul>
-                     <li class="noVNC_heading">
--                        <img src="app/images/settings.svg"> Settings
-+                        <img src="/novnc/app/images/settings.svg"> Settings
-                     </li>
-                     <li>
-                         <label><input id="noVNC_setting_shared" type="checkbox" /> Shared Mode</label>
-@@ -249,7 +249,7 @@
-             </div>
-             <!-- Connection Controls -->
--            <input type="image" alt="Disconnect" src="app/images/disconnect.svg"
-+            <input type="image" alt="Disconnect" src="/novnc/app/images/disconnect.svg"
-                 id="noVNC_disconnect_button" class="noVNC_button"
-                 title="Disconnect" />
-@@ -266,7 +266,7 @@
-         <div id="noVNC_connect_dlg">
-             <div class="noVNC_logo" translate="no"><span>no</span>VNC</div>
-             <div id="noVNC_connect_button"><div>
--                <img src="app/images/connect.svg"> Connect
-+                <img src="/novnc/app/images/connect.svg"> Connect
-             </div></div>
-         </div>
-     </div>
-@@ -314,8 +314,8 @@
-     </div>
-     <audio id="noVNC_bell">
--        <source src="app/sounds/bell.oga" type="audio/ogg">
--        <source src="app/sounds/bell.mp3" type="audio/mpeg">
-+        <source src="/novnc/app/sounds/bell.oga" type="audio/ogg">
-+        <source src="/novnc/app/sounds/bell.mp3" type="audio/mpeg">
-     </audio>
-  </body>
- </html>
--- 
-2.11.0
-
diff --git a/debian/patches/0005-remove-vnc-logos.patch b/debian/patches/0005-remove-vnc-logos.patch
new file mode 100644 (file)
index 0000000..9a0cc43
--- /dev/null
@@ -0,0 +1,56 @@
+From 761e67e803bfcf196cc2229ec451adaee0beb61a 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/10] remove vnc logos
+
+to show the pve icon instead
+
+Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+---
+ vnc.html | 26 --------------------------
+ 1 file changed, 26 deletions(-)
+
+diff --git a/vnc.html b/vnc.html
+index 63d7181..60727e4 100644
+--- a/vnc.html
++++ b/vnc.html
+@@ -23,36 +23,10 @@
+                 Remove this if you use the .htaccess -->
+     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+-    <!-- Icons (see Makefile for what the sizes are for) -->
+-    <link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/novnc-16x16.png">
+-    <link rel="icon" sizes="24x24" type="image/png" href="app/images/icons/novnc-24x24.png">
+-    <link rel="icon" sizes="32x32" type="image/png" href="app/images/icons/novnc-32x32.png">
+-    <link rel="icon" sizes="48x48" type="image/png" href="app/images/icons/novnc-48x48.png">
+-    <link rel="icon" sizes="60x60" type="image/png" href="app/images/icons/novnc-60x60.png">
+-    <link rel="icon" sizes="64x64" type="image/png" href="app/images/icons/novnc-64x64.png">
+-    <link rel="icon" sizes="72x72" type="image/png" href="app/images/icons/novnc-72x72.png">
+-    <link rel="icon" sizes="76x76" type="image/png" href="app/images/icons/novnc-76x76.png">
+-    <link rel="icon" sizes="96x96" type="image/png" href="app/images/icons/novnc-96x96.png">
+-    <link rel="icon" sizes="120x120" type="image/png" href="app/images/icons/novnc-120x120.png">
+-    <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">
+-
+     <!-- Apple iOS Safari settings -->
+     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+     <meta name="apple-mobile-web-app-capable" content="yes" />
+     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+-    <!-- Home Screen Icons (favourites and bookmarks use the normal icons) -->
+-    <link rel="apple-touch-icon" sizes="60x60" type="image/png" href="app/images/icons/novnc-60x60.png">
+-    <link rel="apple-touch-icon" sizes="76x76" type="image/png" href="app/images/icons/novnc-76x76.png">
+-    <link rel="apple-touch-icon" sizes="120x120" type="image/png" href="app/images/icons/novnc-120x120.png">
+-    <link rel="apple-touch-icon" sizes="152x152" type="image/png" href="app/images/icons/novnc-152x152.png">
+-
+     <!-- Stylesheets -->
+     <link rel="stylesheet" href="app/styles/base.css" />
+     <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
+-- 
+2.11.0
+
diff --git a/debian/patches/0006-add-pve-vnc-commands.patch b/debian/patches/0006-add-pve-vnc-commands.patch
deleted file mode 100644 (file)
index 3b83959..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From 1a042fcad1f9242cafbb589a1da5b8b270e8b8bb 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 6/9] add pve vnc commands
-
-Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
----
- vnc.html | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/vnc.html b/vnc.html
-index 23fc0e4..e789d04 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -165,6 +165,26 @@
-                 id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
-                 title="Fullscreen" />
-+          <!-- PVE Commands -->
-+            <input type="image" alt="Commands" src="/novnc/app/images/power.svg"
-+                id="pve_commands_button" class="noVNC_button"
-+                title="Commands" />
-+
-+            <div class="noVNC_vcenter">
-+            <div id="pve_commands" class="noVNC_panel">
-+                <div class="noVNC_heading">
-+                    <img src="/novnc/app/images/power.svg"> Commands
-+                </div>
-+              <input id="pve_command_start" type="button" value="Start" />
-+              <input id="pve_command_shutdown" type="button" value="Shutdown" />
-+              <input id="pve_command_stop" type="button" value="Stop" />
-+              <input id="pve_command_reset" type="button" value="Reset" />
-+              <input id="pve_command_suspend" type="button" value="Suspend" />
-+              <input id="pve_command_resume" type="button" value="Resume" />
-+              <input id="pve_command_reload" type="button" value="Reload" />
-+          </div>
-+          </div>
-+
-             <!-- Settings -->
-             <input type="image" alt="Settings" src="/novnc/app/images/settings.svg"
-                 id="noVNC_settings_button" class="noVNC_button"
--- 
-2.11.0
-
diff --git a/debian/patches/0006-change-src-directory-for-images-js-files.patch b/debian/patches/0006-change-src-directory-for-images-js-files.patch
new file mode 100644 (file)
index 0000000..60f6ab6
--- /dev/null
@@ -0,0 +1,232 @@
+From 87486c038db7ddb212f995c70edf13dc1e8783cd 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/10] change src directory for images/js files
+
+since they will be in /novnc/
+also change the directory in the build script
+
+Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+---
+ app/ui.js                    |  2 +-
+ utils/use_require_helpers.js |  2 +-
+ vnc.html                     | 56 ++++++++++++++++++++++----------------------
+ 3 files changed, 30 insertions(+), 30 deletions(-)
+
+diff --git a/app/ui.js b/app/ui.js
+index d35be49..d64389d 100644
+--- a/app/ui.js
++++ b/app/ui.js
+@@ -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) {
++    WebUtil.fetchJSON('/novnc/app/locale/' + l10n.language + '.json', function (translations) {
+         l10n.dictionary = translations;
+         // wait for translations to load before loading the UI
+diff --git a/utils/use_require_helpers.js b/utils/use_require_helpers.js
+index 990fb4d..0f44e1c 100644
+--- a/utils/use_require_helpers.js
++++ b/utils/use_require_helpers.js
+@@ -22,7 +22,7 @@ module.exports = {
+             var browserify = require('browserify');
+             var b = browserify(path.join(base_out_path, 'app/ui.js'), {});
+             b.bundle().pipe(fs.createWriteStream(out_path));
+-            return `<script src="${path.relative(base_out_path, out_path)}"></script>`;
++            return `<script src="/novnc/${path.relative(base_out_path, out_path)}"></script>`;
+         },
+         noCopyOverride: () => {},
+     },
+diff --git a/vnc.html b/vnc.html
+index 60727e4..fa66d6f 100644
+--- a/vnc.html
++++ b/vnc.html
+@@ -28,7 +28,7 @@
+     <meta name="apple-mobile-web-app-capable" content="yes" />
+     <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+     <!-- Stylesheets -->
+-    <link rel="stylesheet" href="app/styles/base.css" />
++    <link rel="stylesheet" href="/novnc/app/styles/base.css" />
+     <link rel="stylesheet" href="/novnc/app/styles/pve.css" />
+     <!--
+@@ -37,11 +37,11 @@
+     -->
+     <!-- this is included as a normal file in order to catch script-loading errors as well -->
+-    <script type="text/javascript" src="app/error-handler.js"></script>
++    <script type="text/javascript" src="/novnc/app/error-handler.js"></script>
+     <!-- begin scripts -->
+     <!-- promise polyfills promises for IE11 -->
+-    <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;
+@@ -50,12 +50,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>
+     <!-- 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>
+@@ -80,49 +80,49 @@
+             <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"
+                 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"
+                     value="Keyboard" 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="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>
+@@ -130,13 +130,13 @@
+             </div>
+             <!-- 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_power_button" class="noVNC_button"
+                 title="Shutdown/Reboot..." />
+             <div class="noVNC_vcenter">
+             <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_shutdown_button" value="Shutdown" />
+                 <input type="button" id="noVNC_reboot_button" value="Reboot" />
+@@ -145,13 +145,13 @@
+             </div>
+             <!-- Clipboard -->
+-            <input type="image" alt="Clipboard" src="app/images/clipboard.svg"
++            <input type="image" alt="Clipboard" src="/novnc/app/images/clipboard.svg"
+                 id="noVNC_clipboard_button" class="noVNC_button"
+                 title="Clipboard" />
+             <div class="noVNC_vcenter">
+             <div id="noVNC_clipboard" class="noVNC_panel">
+                 <div class="noVNC_heading">
+-                    <img src="app/images/clipboard.svg"> Clipboard
++                    <img src="/novnc/app/images/clipboard.svg"> Clipboard
+                 </div>
+                 <textarea id="noVNC_clipboard_text" rows=5></textarea>
+                 <br />
+@@ -161,19 +161,19 @@
+             </div>
+             <!-- Toggle fullscreen -->
+-            <input type="image" alt="Fullscreen" src="app/images/fullscreen.svg"
++            <input type="image" alt="Fullscreen" src="/novnc/app/images/fullscreen.svg"
+                 id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
+                 title="Fullscreen" />
+             <!-- Settings -->
+-            <input type="image" alt="Settings" src="app/images/settings.svg"
++            <input type="image" alt="Settings" src="/novnc/app/images/settings.svg"
+                 id="noVNC_settings_button" class="noVNC_button"
+                 title="Settings" />
+             <div class="noVNC_vcenter">
+             <div id="noVNC_settings" class="noVNC_panel">
+                 <ul>
+                     <li class="noVNC_heading">
+-                        <img src="app/images/settings.svg"> Settings
++                        <img src="/novnc/app/images/settings.svg"> Settings
+                     </li>
+                     <li>
+                         <label><input id="noVNC_setting_shared" type="checkbox" /> Shared Mode</label>
+@@ -244,7 +244,7 @@
+             </div>
+             <!-- Connection Controls -->
+-            <input type="image" alt="Disconnect" src="app/images/disconnect.svg"
++            <input type="image" alt="Disconnect" src="/novnc/app/images/disconnect.svg"
+                 id="noVNC_disconnect_button" class="noVNC_button"
+                 title="Disconnect" />
+@@ -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>
+-                <img src="app/images/connect.svg"> Connect
++                <img src="/novnc/app/images/connect.svg"> Connect
+             </div></div>
+         </div>
+     </div>
+@@ -304,8 +304,8 @@
+     </div>
+     <audio id="noVNC_bell">
+-        <source src="app/sounds/bell.oga" type="audio/ogg">
+-        <source src="app/sounds/bell.mp3" type="audio/mpeg">
++        <source src="/novnc/app/sounds/bell.oga" type="audio/ogg">
++        <source src="/novnc/app/sounds/bell.mp3" type="audio/mpeg">
+     </audio>
+  </body>
+ </html>
+-- 
+2.11.0
+
diff --git a/debian/patches/0007-add-pve-vnc-commands.patch b/debian/patches/0007-add-pve-vnc-commands.patch
new file mode 100644 (file)
index 0000000..b81852a
--- /dev/null
@@ -0,0 +1,44 @@
+From d83521eab33ef32d35f4ea8ada73585bad4265a4 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/10] add pve vnc commands
+
+Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+---
+ vnc.html | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/vnc.html b/vnc.html
+index fa66d6f..8c3d9d9 100644
+--- a/vnc.html
++++ b/vnc.html
+@@ -165,6 +165,26 @@
+                 id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
+                 title="Fullscreen" />
++          <!-- PVE Commands -->
++            <input type="image" alt="Commands" src="/novnc/app/images/power.svg"
++                id="pve_commands_button" class="noVNC_button"
++                title="Commands" />
++
++            <div class="noVNC_vcenter">
++            <div id="pve_commands" class="noVNC_panel">
++                <div class="noVNC_heading">
++                    <img src="/novnc/app/images/power.svg"> Commands
++                </div>
++              <input id="pve_command_start" type="button" value="Start" />
++              <input id="pve_command_shutdown" type="button" value="Shutdown" />
++              <input id="pve_command_stop" type="button" value="Stop" />
++              <input id="pve_command_reset" type="button" value="Reset" />
++              <input id="pve_command_suspend" type="button" value="Suspend" />
++              <input id="pve_command_resume" type="button" value="Resume" />
++              <input id="pve_command_reload" type="button" value="Reload" />
++          </div>
++          </div>
++
+             <!-- Settings -->
+             <input type="image" alt="Settings" src="/novnc/app/images/settings.svg"
+                 id="noVNC_settings_button" class="noVNC_button"
+-- 
+2.11.0
+
diff --git a/debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch b/debian/patches/0007-add-replaceable-snippets-in-vnc.html.patch
deleted file mode 100644 (file)
index 6ea98a1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From c3d885b78fd816201ed485eb7a681ce1fcf3a122 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 7/9] add replaceable snippets in vnc.html
-
-so that we can insert the username/csrftoken via search/replace
-
-Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
----
- vnc.html | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/vnc.html b/vnc.html
-index e789d04..1423f78 100644
---- a/vnc.html
-+++ b/vnc.html
-@@ -15,7 +15,7 @@
-     or the fragment:
-         http://example.com/#host=HOST&port=PORT&encrypt=1
-     -->
--    <title>noVNC</title>
-+    <title>[% nodename %] - Proxmox Console</title>
-     <meta charset="utf-8" />
-@@ -38,6 +38,12 @@
-     <!-- this is included as a normal file in order to catch script-loading errors as well -->
-     <script type="text/javascript" src="/novnc/app/error-handler.js"></script>
-+    <script type="text/javascript">
-+      if (typeof(PVE) === 'undefined') PVE = {};
-+      PVE.UserName = '[% username %]';
-+      PVE.CSRFPreventionToken = '[% token %]';
-+      INCLUDE_URI='/novnc/include';
-+    </script>
-     <!-- begin scripts -->
-     <!-- promise polyfills promises for IE11 -->
--- 
-2.11.0
-
diff --git a/debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch b/debian/patches/0008-add-replaceable-snippets-in-vnc.html.patch
new file mode 100644 (file)
index 0000000..41b3ee2
--- /dev/null
@@ -0,0 +1,41 @@
+From f56b6fe825b776c30e445d2319488bec63551b8f 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/10] add replaceable snippets in vnc.html
+
+so that we can insert the username/csrftoken via search/replace
+
+Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
+---
+ vnc.html | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/vnc.html b/vnc.html
+index 8c3d9d9..a139e26 100644
+--- a/vnc.html
++++ b/vnc.html
+@@ -15,7 +15,7 @@
+     or the fragment:
+         http://example.com/#host=HOST&port=PORT&encrypt=1
+     -->
+-    <title>noVNC</title>
++    <title>[% nodename %] - Proxmox Console</title>
+     <meta charset="utf-8" />
+@@ -38,6 +38,12 @@
+     <!-- this is included as a normal file in order to catch script-loading errors as well -->
+     <script type="text/javascript" src="/novnc/app/error-handler.js"></script>
++    <script type="text/javascript">
++      if (typeof(PVE) === 'undefined') PVE = {};
++      PVE.UserName = '[% username %]';
++      PVE.CSRFPreventionToken = '[% token %]';
++      INCLUDE_URI='/novnc/include';
++    </script>
+     <!-- begin scripts -->
+     <!-- promise polyfills promises for IE11 -->
+-- 
+2.11.0
+
diff --git a/debian/patches/0008-focus-canvas-after-load.patch b/debian/patches/0008-focus-canvas-after-load.patch
deleted file mode 100644 (file)
index 4c38bbb..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From b97c51d6a2ca70a5e60209cd7ab16563455b8d13 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak@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@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
-
index ff9ba1a0b6afc211a49bd051a774bb24aeda4a7b..95d94a3bf9392b5886d931436f3374cf050ae4b4 100644 (file)
@@ -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@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@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;
  
index e225250aa721ed2ed03bebcbc7546591b56233ac..bbba8311739b84527e11727f69f1644e7c3e3542 100644 (file)
@@ -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@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@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 (file)
index ed1f4c3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From d3da00817202a762de5bcd7cf14c38dceb30a301 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak@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@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 (file)
index 9e7af7d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 486e178afc6db131a0b24b18442e5b9fb04f37b0 Mon Sep 17 00:00:00 2001
-From: Dominik Csapak <d.csapak@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@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
-
index 295a899e63561f4dbe81415ba93822022886ee2f..de6890a2c6c06351acd597082e5b04df364534de 100644 (file)
@@ -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