Browse Source

mobile display view without line break

pull/1663/head
geronet1 7 months ago
parent
commit
13c009608b
  1. 18
      src/web/html/index.html

18
src/web/html/index.html

@ -116,6 +116,8 @@
var p = div(["none"]); var p = div(["none"]);
var total = 0; var total = 0;
var count = 0; var count = 0;
var mobile = window.screen.width < 470;
for(var i of obj) { for(var i of obj) {
var icon = iconSuccess; var icon = iconSuccess;
var cl = "icon-success"; var cl = "icon-success";
@ -131,7 +133,8 @@
} else if(0 == i["ts_last_success"]) { } else if(0 == i["ts_last_success"]) {
avail = "{#AVAIL_NO_DATA}"; avail = "{#AVAIL_NO_DATA}";
} else { } else {
avail = "{#AVAIL} "; if (!mobile)
avail = "{#AVAIL} ";
if(false == i["is_producing"]) if(false == i["is_producing"])
avail += "{#NOT_PRODUCING}"; avail += "{#NOT_PRODUCING}";
else { else {
@ -142,11 +145,16 @@
} }
} }
var text;
if (mobile)
text = "#";
else
text = "{#INVERTER} #";
p.append( p.append(
svg(icon, 30, 30, "icon " + cl), svg(icon, 30, 30, "icon " + cl),
span("{#INVERTER} #" + i["id"] + ": " + i["name"] + " {#IS} " + avail), span(text + i["id"] + ": " + i["name"] + " {#IS} " + avail),
br() br()
); );
if(false == i["is_avail"]) { if(false == i["is_avail"]) {
if(i["ts_last_success"] > 0) { if(i["ts_last_success"] > 0) {

Loading…
Cancel
Save