feat: make ops cards collapsible, hide notice and user display, increase button sizes
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 12s

This commit is contained in:
Kroonk
2026-05-21 18:21:47 +02:00
parent 995a397b2e
commit 76b7a96673
3 changed files with 74 additions and 12 deletions

View File

@@ -695,6 +695,32 @@ function startOpsAutoRefresh() {
}, 60000);
}
function initCollapsibleCards() {
document.querySelectorAll('.ops-card-head').forEach((head) => {
const card = head.closest('.ops-card');
if (!card) return;
const bodyEl = card.querySelector('.services-status-board, .ops-list');
const id = bodyEl ? bodyEl.id : null;
const storageKey = id ? `ops-card-collapsed-${id}` : null;
if (storageKey) {
const isCollapsed = localStorage.getItem(storageKey) === 'true';
card.classList.toggle('is-collapsed', isCollapsed);
}
head.addEventListener('click', (event) => {
if (event.target.closest('button')) {
return;
}
card.classList.toggle('is-collapsed');
if (storageKey) {
localStorage.setItem(storageKey, card.classList.contains('is-collapsed'));
}
});
});
}
async function boot() {
await handleCallback();
tokenSet = getStoredTokens();
@@ -717,6 +743,7 @@ async function boot() {
logoutButton.hidden = false;
adminUser.textContent = `Angemeldet als ${claims.preferred_username || claims.email}`;
renderEditor();
initCollapsibleCards();
refreshOps();
startOpsAutoRefresh();
}