mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 17:41:54 +08:00
refactoring
This commit is contained in:
@@ -34,11 +34,10 @@ function __loadKvmdInfo() {
|
||||
let http = tools.makeRequest("GET", "/api/info", function() {
|
||||
if (http.readyState === 4) {
|
||||
if (http.status === 200) {
|
||||
let port = JSON.parse(http.responseText).result.extras.vnc.port;
|
||||
let host = window.location.hostname;
|
||||
let vnc_port = JSON.parse(http.responseText).result.extras.vnc.port;
|
||||
$("vnc-text").innerHTML = `
|
||||
<span class="code-comment"># How to connect using the Linux terminal:<br>
|
||||
$</span> vncviewer ${host}::${port}
|
||||
$</span> vncviewer ${window.location.hostname}::${vnc_port}
|
||||
`;
|
||||
} else if (http.status === 401 || http.status === 403) {
|
||||
document.location.href = "/login";
|
||||
|
||||
Reference in New Issue
Block a user