Skip to content

Commit

Permalink
Add "reload page" button when Lounge fails to start.
Browse files Browse the repository at this point in the history
  • Loading branch information
bews committed Jun 10, 2017
1 parent 45df995 commit cba8758
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/index.html
Expand Up @@ -52,7 +52,10 @@ <h1 class="title">The Lounge is loading…</h1>
</div>
<div class="col-xs-12">
<p id="loading-page-message">Loading the app… <a href="http://enable-javascript.com/" target="_blank" rel="noopener">Make sure to have JavaScript enabled.</a></p>
<p id="loading-slow">This is taking longer than it should, there might be connectivity issues.</p>
<div id="loading-slow">
<p>This is taking longer than it should, there might be connectivity issues.</p>
<button id="loading-slow-reload" class="btn">Reload page</button>
</div>
<script async src="js/loading-slow-alert.js"></script>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions client/js/loading-slow-alert.js
Expand Up @@ -15,3 +15,7 @@ setTimeout(function() {
element.style.display = "block";
}
}, 5000);

document.getElementById("loading-slow-reload").addEventListener("click", function() {
location.reload();
});

0 comments on commit cba8758

Please sign in to comment.