Add version number to UI

This commit is contained in:
Juanjo Diaz 2019-07-19 13:36:55 +03:00
parent 21ac6ca0f2
commit e7d8f93952
3 changed files with 14 additions and 0 deletions

View File

@ -564,6 +564,14 @@ select:active {
#noVNC_control_bar .noVNC_logo {
font-size: 13px;
margin-bottom: 0;
}
.noVNC_version {
margin: 0;
font-size: small;
text-align: center;
color: #ffa500;
}
:root:not(.noVNC_connected) #noVNC_view_drag_button {

View File

@ -59,6 +59,11 @@ const UI = {
// Translate the DOM
l10n.translateDOM();
WebUtil.fetchJSON('../package.json')
.then((packageInfo) => {
Array.from(document.getElementsByClassName('noVNC_version')).forEach(el => el.innerText = packageInfo.version);
});
// Adapt the interface for touch screen devices
if (isTouchDevice) {
document.documentElement.classList.add("noVNC_touch");

View File

@ -92,6 +92,7 @@
<div class="noVNC_scroll">
<h1 class="noVNC_logo" translate="no"><span>no</span><br>VNC</h1>
<h2 class="noVNC_version" translate="no"></h2>
<!-- Drag/Pan the viewport -->
<input type="image" alt="viewport drag" src="app/images/drag.svg"