most of the initial structure and content
This commit is contained in:
parent
a486b7bbb7
commit
d7b50372a8
11 changed files with 517 additions and 83 deletions
|
@ -16,10 +16,20 @@ function checkSpace() {
|
|||
icon.src = data.state.icon.closed;
|
||||
}
|
||||
icon.alt = "Der Space ist " + openText;
|
||||
const lastchangeString = data.state.lastchange
|
||||
? new Date(data.state.lastchange * 1000).toLocaleString(true, {
|
||||
timeStyle: "short",
|
||||
dateStyle: "medium",
|
||||
})
|
||||
: "unbekannt";
|
||||
icon.title = "Letzte Statusänderung: " + lastchangeString;
|
||||
console.log("Icon: " + icon.src);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
icon.src = "/img/unknown.png";
|
||||
icon.alt = "Der Spacestatus ist unbekannt";
|
||||
icon.title = "";
|
||||
console.error("Error on space state retrieval:", error);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue