Redesign UI and add first-party Docker runtime support
This commit is contained in:
@@ -18,6 +18,7 @@ class Server {
|
||||
if (this.cmd != "updateLog") {
|
||||
showElement("loading", true)
|
||||
UNDO = new Object()
|
||||
setConnectionState("busy")
|
||||
}
|
||||
|
||||
switch(window.location.protocol) {
|
||||
@@ -36,6 +37,9 @@ class Server {
|
||||
ws.onopen = function() {
|
||||
|
||||
WS_AVAILABLE = true
|
||||
if (data["cmd"] != "updateLog") {
|
||||
setConnectionState("busy")
|
||||
}
|
||||
|
||||
console.log("REQUEST (JS):");
|
||||
console.log(data)
|
||||
@@ -51,6 +55,7 @@ class Server {
|
||||
|
||||
console.log("No websocket connection to xTeVe could be established. Check your network configuration.")
|
||||
SERVER_CONNECTION = false
|
||||
setConnectionState("offline")
|
||||
|
||||
if (WS_AVAILABLE == false) {
|
||||
alert("No websocket connection to xTeVe could be established. Check your network configuration.")
|
||||
@@ -63,6 +68,9 @@ class Server {
|
||||
|
||||
SERVER_CONNECTION = false
|
||||
showElement("loading", false)
|
||||
if (data["cmd"] != "updateLog") {
|
||||
setConnectionState("online")
|
||||
}
|
||||
|
||||
console.log("RESPONSE:");
|
||||
var response = JSON.parse(e.data);
|
||||
@@ -74,6 +82,7 @@ class Server {
|
||||
}
|
||||
|
||||
if (response["status"] == false) {
|
||||
setConnectionState("offline")
|
||||
|
||||
alert(response["err"])
|
||||
|
||||
@@ -144,4 +153,4 @@ function getCookie(name) {
|
||||
var value = "; " + document.cookie;
|
||||
var parts = value.split("; " + name + "=");
|
||||
if (parts.length == 2) return parts.pop().split(";").shift();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user