overhaul chat structure

This commit is contained in:
Frederik Spirgi
2026-09-09 09:47:48 +02:00
parent 5543deb142
commit 93dd57a336
11 changed files with 824 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import {post} from './api.js';
// Every page gets this control from the same server-rendered header.
for (const button of document.querySelectorAll('[data-sign-out]')) {
button.addEventListener('click', async () => {
button.disabled = true;
const result = await post('/logout', {});
if (result.error) {
button.disabled = false;
const notice = document.querySelector('#shellNotice');
notice.textContent = result.error;
notice.classList.remove('hidden');
return;
}
location.assign('/');
});
}