[pve-devel] [PATCH novnc v2 1/3] upgrade noVNC and patches to 1.5.0
Dominik Csapak
d.csapak at proxmox.com
Tue Nov 12 08:51:33 CET 2024
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
changes from v1:
* rebased on master
.../0001-add-PVE-specific-JS-code.patch | 4 ++--
...002-add-custom-fbresize-event-on-rfb.patch | 10 +++++-----
...nge-scaling-when-toggling-fullscreen.patch | 6 +++---
...rectory-for-fetching-images-js-files.patch | 20 +++++++++----------
.../0009-decrease-animation-time.patch | 2 +-
.../0011-add-localCursor-setting-to-rfb.patch | 18 ++++++++---------
...ove-the-default-value-of-wsProtocols.patch | 4 ++--
novnc | 2 +-
8 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/debian/patches/0001-add-PVE-specific-JS-code.patch b/debian/patches/0001-add-PVE-specific-JS-code.patch
index ca01d11..655a2cd 100644
--- a/debian/patches/0001-add-PVE-specific-JS-code.patch
+++ b/debian/patches/0001-add-PVE-specific-JS-code.patch
@@ -453,7 +453,7 @@ index 0000000..1a062ad
+ },
+};
diff --git a/app/ui.js b/app/ui.js
-index c1f6776..c86f36c 100644
+index f27dfe2..f2f194c 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -17,6 +17,7 @@ import keysyms from "../core/input/keysymdef.js";
@@ -560,7 +560,7 @@ index c1f6776..c86f36c 100644
},
/* ------^-------
-@@ -1689,9 +1702,36 @@ const UI = {
+@@ -1697,9 +1710,36 @@ const UI = {
/* ------^-------
* /EXTRA KEYS
* ==============
diff --git a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
index 1991bd6..286d665 100644
--- a/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
+++ b/debian/patches/0002-add-custom-fbresize-event-on-rfb.patch
@@ -13,10 +13,10 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
2 files changed, 21 insertions(+)
diff --git a/app/ui.js b/app/ui.js
-index c86f36c..5beef1e 100644
+index f2f194c..f32b67c 100644
--- a/app/ui.js
+++ b/app/ui.js
-@@ -1068,6 +1068,7 @@ const UI = {
+@@ -1076,6 +1076,7 @@ const UI = {
UI.rfb.addEventListener("clipboard", UI.clipboardReceive);
UI.rfb.addEventListener("bell", UI.bell);
UI.rfb.addEventListener("desktopname", UI.updateDesktopName);
@@ -24,7 +24,7 @@ index c86f36c..5beef1e 100644
UI.rfb.clipViewport = UI.getSetting('view_clip');
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
-@@ -1727,6 +1728,16 @@ const UI = {
+@@ -1735,6 +1736,16 @@ const UI = {
document.getElementById('pve_commands_button').classList.remove("noVNC_selected");
},
@@ -42,10 +42,10 @@ index c86f36c..5beef1e 100644
* /PVE
* ==============
diff --git a/core/rfb.js b/core/rfb.js
-index 6afd7c6..2f662ce 100644
+index f2deb0e..37ba099 100644
--- a/core/rfb.js
+++ b/core/rfb.js
-@@ -2881,6 +2881,16 @@ export default class RFB extends EventTargetMixin {
+@@ -2873,6 +2873,16 @@ export default class RFB extends EventTargetMixin {
this._updateClip();
this._updateScale();
diff --git a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
index e80835a..5cf14e5 100644
--- a/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
+++ b/debian/patches/0003-change-scaling-when-toggling-fullscreen.patch
@@ -12,10 +12,10 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
1 file changed, 11 insertions(+)
diff --git a/app/ui.js b/app/ui.js
-index 5beef1e..1e64f20 100644
+index f32b67c..04a5a2a 100644
--- a/app/ui.js
+++ b/app/ui.js
-@@ -1286,6 +1286,13 @@ const UI = {
+@@ -1294,6 +1294,13 @@ const UI = {
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
@@ -29,7 +29,7 @@ index 5beef1e..1e64f20 100644
} else {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
-@@ -1296,7 +1303,11 @@ const UI = {
+@@ -1304,7 +1311,11 @@ const UI = {
} else if (document.body.msRequestFullscreen) {
document.body.msRequestFullscreen();
}
diff --git a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch
index e4ede34..17586d7 100644
--- a/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch
+++ b/debian/patches/0006-change-source-directory-for-fetching-images-js-files.patch
@@ -13,7 +13,7 @@ Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/app/ui.js b/app/ui.js
-index 1e64f20..1345cc5 100644
+index 04a5a2a..18bac4b 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -73,7 +73,7 @@ const UI = {
@@ -25,15 +25,15 @@ index 1e64f20..1345cc5 100644
.then((response) => {
if (!response.ok) {
throw Error("" + response.status + " " + response.statusText);
-@@ -1829,7 +1829,7 @@ l10n.setup(LINGUAS);
- if (l10n.language === "en" || l10n.dictionary !== undefined) {
- UI.prime();
- } else {
-- fetch('app/locale/' + l10n.language + '.json')
-+ fetch('/novnc/app/locale/' + l10n.language + '.json')
- .then((response) => {
- if (!response.ok) {
- throw Error("" + response.status + " " + response.statusText);
+@@ -1833,7 +1833,7 @@ const UI = {
+
+ // Set up translations
+ const LINGUAS = ["cs", "de", "el", "es", "fr", "it", "ja", "ko", "nl", "pl", "pt_BR", "ru", "sv", "tr", "zh_CN", "zh_TW"];
+-l10n.setup(LINGUAS, "app/locale/")
++l10n.setup(LINGUAS, "/novnc/app/locale/")
+ .catch(err => Log.Error("Failed to load translations: " + err))
+ .then(UI.prime);
+
diff --git a/vnc.html b/vnc.html
index 5c5549d..f081aee 100644
--- a/vnc.html
diff --git a/debian/patches/0009-decrease-animation-time.patch b/debian/patches/0009-decrease-animation-time.patch
index 35f6b4f..5d76932 100644
--- a/debian/patches/0009-decrease-animation-time.patch
+++ b/debian/patches/0009-decrease-animation-time.patch
@@ -11,7 +11,7 @@ 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 06e736a..a3eb872 100644
+index f83ad4b..fd1a66e 100644
--- a/app/styles/base.css
+++ b/app/styles/base.css
@@ -222,7 +222,7 @@ html {
diff --git a/debian/patches/0011-add-localCursor-setting-to-rfb.patch b/debian/patches/0011-add-localCursor-setting-to-rfb.patch
index ac0ebc5..c090169 100644
--- a/debian/patches/0011-add-localCursor-setting-to-rfb.patch
+++ b/debian/patches/0011-add-localCursor-setting-to-rfb.patch
@@ -15,7 +15,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
4 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/app/ui.js b/app/ui.js
-index 1345cc5..b2744bb 100644
+index 18bac4b..e70e922 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -180,6 +180,7 @@ const UI = {
@@ -35,7 +35,7 @@ index 1345cc5..b2744bb 100644
UI.addSettingChangeHandler('host');
UI.addSettingChangeHandler('port');
UI.addSettingChangeHandler('path');
-@@ -1070,6 +1073,7 @@ const UI = {
+@@ -1078,6 +1081,7 @@ const UI = {
UI.rfb.addEventListener("desktopname", UI.updateDesktopName);
UI.rfb.addEventListener("fbresize", UI.updateSessionSize);
UI.rfb.clipViewport = UI.getSetting('view_clip');
@@ -43,7 +43,7 @@ index 1345cc5..b2744bb 100644
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
UI.rfb.qualityLevel = parseInt(UI.getSetting('quality'));
-@@ -1754,6 +1758,12 @@ const UI = {
+@@ -1762,6 +1766,12 @@ const UI = {
* ==============
* MISC
* ------v------*/
@@ -57,7 +57,7 @@ index 1345cc5..b2744bb 100644
if (!UI.rfb) return;
UI.rfb.viewOnly = UI.getSetting('view_only');
diff --git a/core/rfb.js b/core/rfb.js
-index 2f662ce..2dc0638 100644
+index 37ba099..0f31079 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -290,6 +290,7 @@ export default class RFB extends EventTargetMixin {
@@ -85,7 +85,7 @@ index 2f662ce..2dc0638 100644
set showDotCursor(show) {
this._showDotCursor = show;
diff --git a/core/util/cursor.js b/core/util/cursor.js
-index 3000cf0..0d9651f 100644
+index 20e75f1..91763a5 100644
--- a/core/util/cursor.js
+++ b/core/util/cursor.js
@@ -12,6 +12,8 @@ export default class Cursor {
@@ -97,7 +97,7 @@ index 3000cf0..0d9651f 100644
this._canvas = document.createElement('canvas');
if (useFallback) {
-@@ -104,7 +106,7 @@ export default class Cursor {
+@@ -106,7 +108,7 @@ export default class Cursor {
}
clear() {
@@ -106,7 +106,7 @@ index 3000cf0..0d9651f 100644
this._canvas.width = 0;
this._canvas.height = 0;
this._position.x = this._position.x + this._hotSpot.x;
-@@ -134,6 +136,11 @@ export default class Cursor {
+@@ -136,6 +138,11 @@ export default class Cursor {
this._updateVisibility(target);
}
@@ -118,7 +118,7 @@ index 3000cf0..0d9651f 100644
_handleMouseOver(event) {
// This event could be because we're entering the target, or
// moving around amongst its sub elements. Let the move handler
-@@ -186,6 +193,11 @@ export default class Cursor {
+@@ -188,6 +195,11 @@ export default class Cursor {
}
}
@@ -130,7 +130,7 @@ index 3000cf0..0d9651f 100644
_showCursor() {
if (this._canvas.style.visibility === 'hidden') {
this._canvas.style.visibility = '';
-@@ -244,4 +256,5 @@ export default class Cursor {
+@@ -246,4 +258,5 @@ export default class Cursor {
return document.captureElement &&
document.documentElement.contains(document.captureElement);
}
diff --git a/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch b/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch
index 1e373d0..0d82f09 100644
--- a/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch
+++ b/debian/patches/0013-Revert-Remove-the-default-value-of-wsProtocols.patch
@@ -15,10 +15,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/rfb.js b/core/rfb.js
-index 2dc0638..39fd869 100644
+index 0f31079..22f2966 100644
--- a/core/rfb.js
+++ b/core/rfb.js
-@@ -117,7 +117,8 @@ export default class RFB extends EventTargetMixin {
+@@ -116,7 +116,8 @@ export default class RFB extends EventTargetMixin {
this._rfbCredentials = options.credentials || {};
this._shared = 'shared' in options ? !!options.shared : true;
this._repeaterID = options.repeaterID || '';
diff --git a/novnc b/novnc
index 90455ee..7fcf9dc 160000
--- a/novnc
+++ b/novnc
@@ -1 +1 @@
-Subproject commit 90455eef0692d2e35276fd31286114d0955016b0
+Subproject commit 7fcf9dcfe0cc5b14e3841a4429dc091a6ffca861
--
2.39.5
More information about the pve-devel
mailing list