infobox/node: more detailed lastseen

This commit is contained in:
Milan Pässler 2016-03-02 22:34:35 +01:00
parent 24987f4963
commit 593a96e07e

View file

@ -39,7 +39,10 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
function showStatus(d) { function showStatus(d) {
return function (el) { return function (el) {
el.classList.add(d.flags.online ? "online" : "offline") el.classList.add(d.flags.online ? "online" : "offline")
el.textContent = (d.flags.online ? "online " : "offline, " + d.lastseen.fromNow(true)) + " (Stand " + d.lastseen.format("DD.MM.YYYY, H:mm:ss)") if (d.flags.online)
el.textContent = "online, letzte Nachricht vor " + d.lastseen.fromNow(true) + " (" + d.lastseen.format("DD.MM.YYYY, H:mm:ss") + ")"
else
el.textContent = "offline, letzte Nachricht vor " + d.lastseen.fromNow(true) + " (" + d.lastseen.format("DD.MM.YYYY, H:mm:ss") + ")"
} }
} }