Skip to content

Commit

Permalink
chore(www): Only show console and video windows if used
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Schaffner <[email protected]>
  • Loading branch information
TobiasSchaffner committed Mar 6, 2024
1 parent 554a604 commit 8c4efdf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mtda/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@
html: "<div id=console></div>",
class: ["no-close", "no-full", "no-max", "modern"],
width: "640px",
height: "480px"
height: "480px",
hidden: true,
});
videoWindow = new WinBox("Video", {
html: "<div id=video></div>",
class: ["no-close", "no-full", "no-max", "modern"],
width: "1360px",
height: "768px"
height: "768px",
hidden: true,
});
consoleWindow.focus()
</script>
Expand Down Expand Up @@ -161,6 +163,9 @@

socket.on("console-output", function (data) {
if (data.output != null) {
if (consoleWindow.hidden) {
consoleWindow.show();
}
term.write(data.output);
}
});
Expand All @@ -171,6 +176,9 @@

import { vnc_load } from './assets/vnc.js'
socket.on("video-info", function (info) {
if (videoWindow.hidden) {
videoWindow.show();
}
if (info.format == 'VNC') {
vnc_load()
}
Expand Down

0 comments on commit 8c4efdf

Please sign in to comment.