Checkpoint audio-only Skald fork work

This commit is contained in:
Storm Dragon
2026-05-18 13:06:57 -04:00
parent a8ada950d5
commit 965347cad4
48 changed files with 1080 additions and 3651 deletions
+21 -21
View File
@@ -23,17 +23,17 @@
document.getElementById('hallform').onsubmit = async function(e) {
e.preventDefault();
clearError();
let groupinput = document.getElementById('hall')
let hallInput = document.getElementById('hall')
let button = document.getElementById('submitbutton');
let group = groupinput.value.trim();
if(group === '')
let hall = hallInput.value.trim();
if(hall === '')
return;
let url = '/hall/' + group + '/';
let url = '/hall/' + hall + '/';
let statusUrl = url + '.status.json';
try {
groupinput.disabled = true;
hallInput.disabled = true;
button.disabled = true;
try {
let resp = await fetch(statusUrl, {
@@ -41,7 +41,7 @@ document.getElementById('hallform').onsubmit = async function(e) {
});
if(!resp.ok) {
if(resp.status === 404)
displayError('No such group');
displayError('No such hall');
else
displayError(`The server said: ${resp.status} ${resp.statusText}`);
return;
@@ -51,7 +51,7 @@ document.getElementById('hallform').onsubmit = async function(e) {
return;
}
} finally {
groupinput.disabled = false;
hallInput.disabled = false;
button.disabled = false;
}
@@ -90,38 +90,38 @@ async function listPublicHalls() {
l = await r.json();
} catch(e) {
table.textContent = `Couldn't fetch halls: ${e}`;
div.classList.remove('nogroups');
div.classList.add('groups');
div.classList.remove('nohalls');
div.classList.add('halls');
return;
}
if (l.length === 0) {
table.textContent = '(No halls found.)';
div.classList.remove('groups');
div.classList.add('nogroups');
div.classList.remove('halls');
div.classList.add('nohalls');
return;
}
div.classList.remove('nogroups');
div.classList.add('groups');
div.classList.remove('nohalls');
div.classList.add('halls');
for(let i = 0; i < l.length; i++) {
let group = l[i];
let hall = l[i];
let tr = document.createElement('tr');
let td = document.createElement('td');
let a = document.createElement('a');
a.textContent = group.displayName || group.name;
a.href = group.location;
a.textContent = hall.displayName || hall.name;
a.href = hall.location;
td.appendChild(a);
tr.appendChild(td);
let td2 = document.createElement('td');
if(group.description)
td2.textContent = group.description;
if(hall.description)
td2.textContent = hall.description;
tr.appendChild(td2);
let td3 = document.createElement('td');
if(!group.redirect) {
let locked = group.locked ? ', locked' : '';
td3.textContent = `(${group.clientCount} clients${locked})`;
if(!hall.redirect) {
let locked = hall.locked ? ', locked' : '';
td3.textContent = `(${hall.clientCount} clients${locked})`;
} else {
td3.textContent = '(remote)';
}