]> git.proxmox.com Git - novnc-pve.git/commitdiff
ship minimal packages.json
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 May 2021 08:52:34 +0000 (10:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 May 2021 08:58:10 +0000 (10:58 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/install
debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch
debian/rules

index f951a7f5477fb34c4bab099ab37f8fa3dfcb8e0e..e7ee694bac22bf834615f4ee0cd6e4b7c5d2ba4a 100644 (file)
@@ -4,5 +4,6 @@ app/sounds           usr/share/novnc-pve/app
 app/styles           usr/share/novnc-pve/app
 app/error-handler.js usr/share/novnc-pve/app
 app.js               usr/share/novnc-pve
+package.json         usr/share/novnc-pve
 docs                 usr/share/novnc-pve
 index.html.tpl       usr/share/novnc-pve
index 151adcd299329f7e8d9e86a2d8b948356ea81f9b..d14dabc7a9d0cc63bf35422f683ebe8f4c2ebc3d 100644 (file)
@@ -8,14 +8,23 @@ also change the directory in the build script
 
 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 ---
- app/ui.js |  2 +-
+ app/ui.js |  4 ++--
  vnc.html  | 50 +++++++++++++++++++++++++-------------------------
- 2 files changed, 26 insertions(+), 26 deletions(-)
+ 2 files changed, 27 insertions(+), 27 deletions(-)
 
 diff --git a/app/ui.js b/app/ui.js
-index ef2c77f..d604067 100644
+index ef2c77f..1605565 100644
 --- a/app/ui.js
 +++ b/app/ui.js
+@@ -64,7 +64,7 @@ const UI = {
+         // Translate the DOM
+         l10n.translateDOM();
+-        WebUtil.fetchJSON('./package.json')
++        WebUtil.fetchJSON('/novnc/package.json')
+             .then((packageInfo) => {
+                 Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version);
+             })
 @@ -1767,7 +1767,7 @@ l10n.setup(LINGUAS);
  if (l10n.language === "en" || l10n.dictionary !== undefined) {
      UI.prime();
index 2ee7acd0726c8f33b34f113a8f07ac02e9998f56..3599277996ff83f42708c49c0cbe29c786f4c28d 100755 (executable)
@@ -17,4 +17,5 @@ override_dh_auto_build:
 override_dh_install:
        cp vnc.html index.html.tpl
        sed -i -re "s/\.(css|js)/\.\1?ver=${DEB_VERSION_UPSTREAM_REVISION}/g" index.html.tpl
+       echo "{ \"version\": \"${DEB_VERSION_UPSTREAM_REVISION}\" }" >package.json
        dh_install