diff --git a/code/espurna/web.ino b/code/espurna/web.ino index 66520867..2a5289e8 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -479,9 +479,9 @@ void _wsStart(uint32_t client_id) { root["webMode"] = WEB_MODE_NORMAL; - root["app"] = APP_NAME; - root["version"] = APP_VERSION; - root["build"] = buildTime(); + root["app_name"] = APP_NAME; + root["app_version"] = APP_VERSION; + root["app_build"] = buildTime(); root["manufacturer"] = String(MANUFACTURER); root["chipid"] = chipid; diff --git a/code/html/custom.css b/code/html/custom.css index 239d3239..6be20039 100644 --- a/code/html/custom.css +++ b/code/html/custom.css @@ -135,7 +135,6 @@ input[name=upgrade] { margin-top: -50px; margin-left: -200px; } - div.state { border-top: 1px solid #eee; margin-top: 20px; @@ -150,7 +149,6 @@ div.state { font-size: 80%; font-weight: bold; } - .right { text-align: right; } @@ -174,15 +172,12 @@ div.state { margin: 10px 2px; padding: 20px; } - #panel-rfb input { margin-right: 5px; } - #panel-rfb label { padding-top: 5px; } - #panel-rfb input { text-align: center; } diff --git a/code/html/custom.js b/code/html/custom.js index 2aa86161..2e93ca43 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -1,7 +1,6 @@ var websock; var password = false; var maxNetworks; -var useWhite = false; var messages = []; var webhost; @@ -10,6 +9,8 @@ var numReset = 0; var numReconnect = 0; var numReload = 0; +var useWhite = false; + // ----------------------------------------------------------------------------- // Messages // ----------------------------------------------------------------------------- @@ -280,12 +281,6 @@ function doReconnect(ask) { } -function doToggle(element, value) { - var relayID = parseInt(element.attr("data")); - websock.send(JSON.stringify({'action': 'relay', 'data': { 'id': relayID, 'status': value ? 1 : 0 }})); - return false; -} - function doBackup() { document.getElementById('downloader').src = webhost + 'config'; return false; @@ -325,6 +320,12 @@ function doRestore() { return false; } +function doToggle(element, value) { + var relayID = parseInt(element.attr("data")); + websock.send(JSON.stringify({'action': 'relay', 'data': { 'id': relayID, 'status': value ? 1 : 0 }})); + return false; +} + // ----------------------------------------------------------------------------- // Visualization // ----------------------------------------------------------------------------- @@ -609,10 +610,10 @@ function rfbSend() { function processData(data) { // title - if ("app" in data) { - var title = data.app; - if ("version" in data) { - title = title + " " + data.version; + if ("app_name" in data) { + var title = data.app_name; + if ("app_version" in data) { + title = title + " " + data.app_version; } $(".pure-menu-heading").html(title); if ("hostname" in data) { diff --git a/code/html/index.html b/code/html/index.html index ecd4027d..acbf3283 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -249,11 +249,14 @@