mirror of
git://git.proxmox.com/git/novnc-pve.git
synced 2025-02-01 09:47:22 +03:00
86b61b8527
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
197 lines
9.3 KiB
Diff
197 lines
9.3 KiB
Diff
From 0000000000000000000000000000000000000000 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] change source-directory for fetching images/js files
|
|
|
|
since they will be served from `/novnc/`
|
|
also change the directory in the build script
|
|
|
|
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
|
|
---
|
|
app/ui.js | 4 ++--
|
|
vnc.html | 50 +++++++++++++++++++++++++-------------------------
|
|
2 files changed, 27 insertions(+), 27 deletions(-)
|
|
|
|
diff --git a/app/ui.js b/app/ui.js
|
|
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();
|
|
} else {
|
|
- WebUtil.fetchJSON('app/locale/' + l10n.language + '.json')
|
|
+ WebUtil.fetchJSON('/novnc/app/locale/' + l10n.language + '.json')
|
|
.then((translations) => { l10n.dictionary = translations; })
|
|
.catch(err => Log.Error("Failed to load translations: " + err))
|
|
.then(UI.prime);
|
|
diff --git a/vnc.html b/vnc.html
|
|
index 12db665..396ded8 100644
|
|
--- a/vnc.html
|
|
+++ b/vnc.html
|
|
@@ -26,19 +26,19 @@
|
|
<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" />
|
|
|
|
<!-- this is included as a normal file in order to catch script-loading errors as well -->
|
|
- <script src="app/error-handler.js"></script>
|
|
+ <script 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 nomodule src="vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></script>
|
|
+ <script nomodule src="/novnc/vendor/browser-es-module-loader/dist/browser-es-module-loader.js"></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>
|
|
|
|
@@ -63,51 +63,51 @@
|
|
<h1 class="noVNC_logo" translate="no"><span>no</span><br>VNC</h1>
|
|
|
|
<!-- Drag/Pan the viewport -->
|
|
- <input type="image" alt="Drag" src="app/images/drag.svg"
|
|
+ <input type="image" alt="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="Keyboard" src="app/images/keyboard.svg"
|
|
+ <input type="image" alt="Keyboard" src="/novnc/app/images/keyboard.svg"
|
|
id="noVNC_keyboard_button" class="noVNC_button" title="Show Keyboard">
|
|
</div>
|
|
|
|
<!-- Extra manual 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="Windows" src="app/images/windows.svg"
|
|
+ <input type="image" alt="Windows" src="/novnc/app/images/windows.svg"
|
|
id="noVNC_toggle_windows_button" class="noVNC_button"
|
|
title="Toggle Windows">
|
|
- <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>
|
|
</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 alt="" src="app/images/power.svg"> Power
|
|
+ <img alt="" 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">
|
|
@@ -116,13 +116,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 alt="" src="app/images/clipboard.svg"> Clipboard
|
|
+ <img alt="" src="/novnc/app/images/clipboard.svg"> Clipboard
|
|
</div>
|
|
<textarea id="noVNC_clipboard_text" rows=5></textarea>
|
|
<br>
|
|
@@ -132,19 +132,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 alt="" src="app/images/settings.svg"> Settings
|
|
+ <img alt="" src="/novnc/app/images/settings.svg"> Settings
|
|
</li>
|
|
<li style="display:none;">
|
|
<label><input id="noVNC_setting_shared" type="checkbox"> Shared Mode</label>
|
|
@@ -235,7 +235,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">
|
|
|
|
@@ -254,7 +254,7 @@
|
|
<div id="noVNC_connect_dlg">
|
|
<div class="noVNC_logo" translate="no"><span>no</span>VNC</div>
|
|
<div id="noVNC_connect_button"><div>
|
|
- <img alt="" src="app/images/connect.svg"> Connect
|
|
+ <img alt="" src="/novnc/app/images/connect.svg"> Connect
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
@@ -298,8 +298,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>
|