Fix admin toggle visibility, include media in results, remove stretch tasks
This commit is contained in:
@@ -160,10 +160,11 @@ function renderResults() {
|
||||
id: r.id,
|
||||
name: r.name,
|
||||
genre: `${r.total} pts • ${r.count} votes • avg ${r.average.toFixed(1)}`,
|
||||
description: r.author ? `By ${r.author}` : "",
|
||||
description: r.description || (r.author ? `By ${r.author}` : ""),
|
||||
screenshotUrl: r.screenshotUrl,
|
||||
youtubeUrl: r.youtubeUrl
|
||||
}, { showAuthor: false });
|
||||
youtubeUrl: r.youtubeUrl,
|
||||
author: r.author
|
||||
}, { showAuthor: true });
|
||||
list.appendChild(card);
|
||||
});
|
||||
}
|
||||
@@ -235,9 +236,11 @@ function setupHandlers() {
|
||||
const adminToggle = $("admin-toggle");
|
||||
const adminCard = $("admin-card");
|
||||
const adminClose = $("admin-close");
|
||||
const togglePanel = (show) => adminCard.classList.toggle("hidden", !show);
|
||||
adminToggle.addEventListener("click", () => togglePanel(!adminCard.classList.contains("hidden")));
|
||||
adminClose.addEventListener("click", () => togglePanel(false));
|
||||
if (adminToggle && adminCard && adminClose) {
|
||||
const togglePanel = (show) => adminCard.classList.toggle("hidden", !show);
|
||||
adminToggle.addEventListener("click", () => togglePanel(!adminCard.classList.contains("hidden")));
|
||||
adminClose.addEventListener("click", () => togglePanel(false));
|
||||
}
|
||||
}
|
||||
|
||||
async function adminAction(path, successMessage) {
|
||||
|
||||
Reference in New Issue
Block a user