Reload page on server restart

This commit is contained in:
Lars Westermann 2019-06-11 17:15:24 +02:00
parent f9149bef25
commit 8913ccc3ce
Signed by: lars.westermann
GPG key ID: 9D417FA5BB9D5E1D
6 changed files with 37 additions and 7 deletions

View file

@ -20,6 +20,7 @@ class PushServiceClient {
private val parser = DynamicObjectParser()
private var timestamp = body.dataset["timestamp"]?.toLongOrNull() ?: 0L
private val signature = body.dataset["signature"] ?: ""
private var intervalId: Int? = null
private fun reload() {
@ -33,7 +34,7 @@ class PushServiceClient {
private fun onMessage(messageBox: MessageBox) {
body.classList.remove("offline")
if (messageBox.valid) {
if (messageBox.valid && signature == messageBox.signature) {
timestamp = messageBox.timestamp
for (message in messageBox.messages) {

View file

@ -45,7 +45,7 @@
.board-header {
height: 8rem !important;
margin-top:0.3rem;
margin-top: 0.3rem;
& > div {
height: 100%;
@ -85,6 +85,22 @@
.board-running {
display: flex;
flex-wrap: wrap;
&:empty + .board-running-empty {
display: block;
}
}
.board-running-empty {
position: absolute !important;
top: 0;
left: 0;
height: 8rem;
line-height: 8rem;
width: 70%;
text-align: center;
font-size: 1.7rem;
font-family: $headFont;
}
.board-schedule {