Browse Source

Small changes in the webUI params

fastled
Xose Pérez 7 years ago
parent
commit
aece4b1624
4 changed files with 22 additions and 23 deletions
  1. +3
    -3
      code/espurna/web.ino
  2. +0
    -5
      code/html/custom.css
  3. +12
    -11
      code/html/custom.js
  4. +7
    -4
      code/html/index.html

+ 3
- 3
code/espurna/web.ino View File

@ -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;


+ 0
- 5
code/html/custom.css View File

@ -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;
}

+ 12
- 11
code/html/custom.js View File

@ -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) {


+ 7
- 4
code/html/index.html View File

@ -249,11 +249,14 @@
<div class="pure-u-1 pure-u-sm-1-4">IP</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="deviceip"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">ESPurna version</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="version"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">Firmware name</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_name"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">ESPurna build</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="build"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">Firmware version</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_version"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">Firmware build</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="app_build"></span></div>
<div class="pure-u-1 pure-u-sm-1-4">Current time</div>
<div class="pure-u-1 pure-u-sm-17-24"><span class="right" name="time"></span></div>


Loading…
Cancel
Save