diff --git a/src/octoprint/static/intermediary.html b/src/octoprint/static/intermediary.html index f33a396f..901b9469 100644 --- a/src/octoprint/static/intermediary.html +++ b/src/octoprint/static/intermediary.html @@ -11,6 +11,13 @@ background-color: #ffffff; } + a, + a:hover, + a:active, + a:visited { + color: #333333; + } + #startup-overlay { position: fixed; top: 0; @@ -53,6 +60,10 @@ text-align: center; } + .normal { + color: #333333; + } + .green { color: #169300; } @@ -166,9 +177,22 @@ var cachedTimeout; var message = window.document.getElementById("message"); + var reloadnow = window.document.getElementById("reloadnow"); + var reloadnowlink = window.document.getElementById("reloadnowlink"); + + var reload = function() { + var reloadUrl = baseUrl + currentQuery + currentFragment; + if (reloadUrl == window.location.href) { + window.location.reload(false); + } else { + window.location.href = reloadUrl; + } + }; var indexCached = false; var indexCachedCallback = function(result) { + if (indexCached) return; + if (result == "load") { if (indexCached) { return; @@ -178,13 +202,9 @@ indexCached = true; message.className = "pulsate1 green"; message.innerText = "OctoPrint server ready, reloading page..."; + reloadnow.style.display = "none"; - var reloadUrl = baseUrl + currentQuery + currentFragment; - if (reloadUrl == window.location.href) { - window.location.reload(false); - } else { - window.location.href = reloadUrl; - } + reload(); } else { // cached.gif still not available, let's look at it again in a second cachedTimeout = setTimeout(function() { @@ -198,6 +218,19 @@ if (result == "load") { // our online.gif loaded, so the server is up, let's wait for it to become ready serverIsOnline = true; + + message.innerText = "OctoPrint server started, waiting for it to get ready..."; + reloadnowlink.onclick = function() { + indexCached = true; // not really, but we fake it + + message.className = "pulsate1"; + message.innerText = "Reloading page..."; + reloadnow.style.display = "none"; + + reload(); + }; + reloadnow.style.display = "block"; + ping(indexCachedUrl, timeout, indexCachedCallback); } else { // online.gif still not available, let's look at it again later @@ -255,6 +288,7 @@