Rename public group URLs to halls

This commit is contained in:
Storm Dragon
2026-05-17 22:22:46 -04:00
parent bda0e548d3
commit 55528b8e62
21 changed files with 312 additions and 312 deletions
+10 -10
View File
@@ -20,16 +20,16 @@
'use strict';
document.getElementById('groupform').onsubmit = async function(e) {
document.getElementById('hallform').onsubmit = async function(e) {
e.preventDefault();
clearError();
let groupinput = document.getElementById('group')
let groupinput = document.getElementById('hall')
let button = document.getElementById('submitbutton');
let group = groupinput.value.trim();
if(group === '')
return;
let url = '/group/' + group + '/';
let url = '/hall/' + group + '/';
let statusUrl = url + '.status.json';
try {
@@ -78,25 +78,25 @@ function clearError() {
}
}
async function listPublicGroups() {
let div = document.getElementById('public-groups');
let table = document.getElementById('public-groups-table');
async function listPublicHalls() {
let div = document.getElementById('public-halls');
let table = document.getElementById('public-halls-table');
let l;
try {
let r = await fetch('/public-groups.json');
let r = await fetch('/public-halls.json');
if(!r.ok)
throw new Error(`${r.status} ${r.statusText}`);
l = await r.json();
} catch(e) {
table.textContent = `Couldn't fetch groups: ${e}`;
table.textContent = `Couldn't fetch halls: ${e}`;
div.classList.remove('nogroups');
div.classList.add('groups');
return;
}
if (l.length === 0) {
table.textContent = '(No groups found.)';
table.textContent = '(No halls found.)';
div.classList.remove('groups');
div.classList.add('nogroups');
return;
@@ -131,4 +131,4 @@ async function listPublicGroups() {
}
listPublicGroups();
listPublicHalls();