Merge pull request #1150 from bews/bews/dev-9-reload

Add "reload page" button when Lounge fails to start.
This commit is contained in:
Jérémie Astori 2017-06-10 13:25:37 -04:00 committed by GitHub
commit 1a6f2fc387
2 changed files with 8 additions and 1 deletions

View File

@ -52,7 +52,10 @@
</div> </div>
<div class="col-xs-12"> <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-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> <script async src="js/loading-slow-alert.js"></script>
</div> </div>
</div> </div>

View File

@ -15,3 +15,7 @@ setTimeout(function() {
element.style.display = "block"; element.style.display = "block";
} }
}, 5000); }, 5000);
document.getElementById("loading-slow-reload").addEventListener("click", function() {
location.reload();
});