Skip to content

Commit 70975c5

Browse files
min max
1 parent ac73e9e commit 70975c5

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

app.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ function loadReports() {
141141
if (!reports) return;
142142

143143
const reportList = document.getElementById("report-list");
144+
reportList.style.display = "block";
144145
reportList.innerHTML = "";
145146

146147
Object.values(reports).forEach(report => {
@@ -155,4 +156,16 @@ function loadReports() {
155156
reportList.appendChild(li);
156157
});
157158
});
159+
}
160+
161+
function minMaxReports() {
162+
const reportList = document.getElementById("report-list");
163+
const button = document.getElementById("min-max");
164+
if (reportList.style.display == "block") {
165+
reportList.style.display = "none";
166+
button.setAttribute('Maximise Reports');
167+
} else {
168+
reportList.style.display = "block";
169+
button.setAttribute('Minimise Reports');
170+
}
158171
}

index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ <h2>Admin Panel</h2>
2929
<button onclick="startRound()">Start New Round</button>
3030
<button onclick="checkResults()">Check Results</button>
3131
<h3>Troll Reports</h3>
32-
<ul id="report-list"></ul>
32+
<ul id="report-list" style="display:none;"></ul>
33+
<button id="min-max" onclick="minMaxReports()">Minimise Reports</button>
3334
</div>
3435

3536
<div id="game-panel" style="display:none;">

0 commit comments

Comments
 (0)