Overhaul legal page and global styles for consistency and responsiveness.

This commit is contained in:
2026-08-09 18:14:13 +02:00
parent 20b5129f57
commit cb330b332e
18 changed files with 1055 additions and 6802 deletions
+15
View File
@@ -58,6 +58,20 @@ function toggleChatDrawer() {
syncChatDrawerState(!isChatDrawerOpen());
}
function handleDisclosureToggle(event) {
const disclosure = event.target;
if (!(disclosure instanceof HTMLDetailsElement) || !chatDrawer?.contains(disclosure)) return;
if (disclosure.matches(".chat-drawer-more, .chat-drawer-danger")) {
const hint = disclosure.querySelector(":scope > summary .chat-drawer-row-hint");
if (hint) hint.textContent = disclosure.open ? "Hide" : "Show";
}
if (disclosure.open) {
chatDrawer.querySelectorAll("details[open]").forEach((other) => {
if (other !== disclosure) other.open = false;
});
}
}
function handleDocumentClick(event) {
if (!isChatDrawerOpen()) return;
const target = event.target;
@@ -103,6 +117,7 @@ if (chatDrawerCloseBtn) {
document.addEventListener("click", handleDocumentClick);
document.addEventListener("keydown", handleDocumentKeydown);
chatDrawer?.addEventListener("toggle", handleDisclosureToggle, true);
export {
closeChatDrawer,