Browse Source

mobile display view without line break

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

10
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,6 +133,7 @@
} else if(0 == i["ts_last_success"]) { } else if(0 == i["ts_last_success"]) {
avail = "{#AVAIL_NO_DATA}"; avail = "{#AVAIL_NO_DATA}";
} else { } else {
if (!mobile)
avail = "{#AVAIL} "; avail = "{#AVAIL} ";
if(false == i["is_producing"]) if(false == i["is_producing"])
avail += "{#NOT_PRODUCING}"; avail += "{#NOT_PRODUCING}";
@ -142,9 +145,14 @@
} }
} }
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()
); );

Loading…
Cancel
Save