mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-29 10:16:21 +02:00
mobile display view without line break
This commit is contained in:
parent
1f90961305
commit
13c009608b
1 changed files with 13 additions and 5 deletions
|
@ -116,6 +116,8 @@
|
|||
var p = div(["none"]);
|
||||
var total = 0;
|
||||
var count = 0;
|
||||
var mobile = window.screen.width < 470;
|
||||
|
||||
for(var i of obj) {
|
||||
var icon = iconSuccess;
|
||||
var cl = "icon-success";
|
||||
|
@ -131,7 +133,8 @@
|
|||
} else if(0 == i["ts_last_success"]) {
|
||||
avail = "{#AVAIL_NO_DATA}";
|
||||
} else {
|
||||
avail = "{#AVAIL} ";
|
||||
if (!mobile)
|
||||
avail = "{#AVAIL} ";
|
||||
if(false == i["is_producing"])
|
||||
avail += "{#NOT_PRODUCING}";
|
||||
else {
|
||||
|
@ -142,11 +145,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
var text;
|
||||
if (mobile)
|
||||
text = "#";
|
||||
else
|
||||
text = "{#INVERTER} #";
|
||||
p.append(
|
||||
svg(icon, 30, 30, "icon " + cl),
|
||||
span("{#INVERTER} #" + i["id"] + ": " + i["name"] + " {#IS} " + avail),
|
||||
br()
|
||||
);
|
||||
svg(icon, 30, 30, "icon " + cl),
|
||||
span(text + i["id"] + ": " + i["name"] + " {#IS} " + avail),
|
||||
br()
|
||||
);
|
||||
|
||||
if(false == i["is_avail"]) {
|
||||
if(i["ts_last_success"] > 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue