mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 01:38:39 +00:00
Add button to stop refreshing page in room visualizer
This commit is contained in:
parent
c1e807b29a
commit
9109e98898
1 changed files with 18 additions and 1 deletions
|
@ -9,7 +9,22 @@
|
|||
Model.Title = "Debug - Room Visualizer";
|
||||
}
|
||||
|
||||
<meta http-equiv="refresh" content="5">
|
||||
<script>
|
||||
let shouldRefresh = true;
|
||||
|
||||
setTimeout(() => {
|
||||
if (shouldRefresh) window.location.reload();
|
||||
}, 5000);
|
||||
|
||||
function stopRefreshing() {
|
||||
shouldRefresh = false;
|
||||
console.log("Stopped refresh");
|
||||
|
||||
const stopRefreshButton = document.getElementById("stop-refresh-button");
|
||||
stopRefreshButton.parentElement.removeChild(stopRefreshButton);
|
||||
console.log("Removed stop refresh button");
|
||||
}
|
||||
</script>
|
||||
|
||||
<p>This page will automatically refresh every 5 seconds.</p>
|
||||
<p>@RoomHelper.Rooms.Count rooms</p>
|
||||
|
@ -22,6 +37,8 @@
|
|||
<div class="ui red button">Nuke all rooms</div>
|
||||
</a>
|
||||
|
||||
<button class="ui blue button" onclick="stopRefreshing()" id="stop-refresh-button">Stop refreshing</button>
|
||||
|
||||
<h2>Best rooms for each game version</h2>
|
||||
@foreach (GameVersion version in Enum.GetValues<GameVersion>())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue