Fix status card regression: revert webhooks-section to sibling structure
All checks were successful
Build and Push Docker Image / build (push) Successful in 47s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 53s
CI / Security audit (push) Successful in 1m2s
CI / Tests & coverage (push) Successful in 1m14s

This commit is contained in:
2026-05-19 22:57:21 +01:00
parent abcb9bfded
commit 96f24eb3b7
3 changed files with 9 additions and 15 deletions

View File

@@ -772,12 +772,13 @@ async function toggleStatusPanel() {
const panel = document.getElementById('status-panel'); const panel = document.getElementById('status-panel');
const webhooksSection = document.getElementById('webhooks-section'); const webhooksSection = document.getElementById('webhooks-section');
if (panel.style.display !== 'none') { if (panel.style.display !== 'none') {
// Close both panels (webhooks is nested, but hide explicitly) // Close both panels (webhooks is a sibling, hide it too)
panel.style.display = 'none'; panel.style.display = 'none';
if (webhooksSection) webhooksSection.style.display = 'none';
if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; } if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; }
return; return;
} }
// Open status panel (contains webhooks nested inside) // Open status panel and webhooks section (siblings)
panel.style.display = 'block'; panel.style.display = 'block';
// Show webhooks section for admin users (collapsed by default) // Show webhooks section for admin users (collapsed by default)
if (webhooksSection && isAdmin) { if (webhooksSection && isAdmin) {
@@ -796,6 +797,8 @@ async function toggleStatusPanel() {
function closeStatusPanel() { function closeStatusPanel() {
document.getElementById('status-panel').style.display = 'none'; document.getElementById('status-panel').style.display = 'none';
const webhooksSection = document.getElementById('webhooks-section');
if (webhooksSection) webhooksSection.style.display = 'none';
if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; } if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; }
} }

View File

@@ -71,8 +71,10 @@
<div id="status-panel" class="status-panel" style="display: none;"> <div id="status-panel" class="status-panel" style="display: none;">
<!-- Status content gets rendered here --> <!-- Status content gets rendered here -->
<div id="status-content"><p class="status-loading">Loading status...</p></div> <div id="status-content"><p class="status-loading">Loading status...</p></div>
<!-- Webhooks Configuration Panel (nested inside status) --> </div>
<div class="webhooks-section" id="webhooks-section" style="display: none;">
<!-- Webhooks Configuration Panel (sibling to status-panel) -->
<div class="webhooks-section" id="webhooks-section" style="display: none;">
<div class="webhooks-header" id="webhooks-header"> <div class="webhooks-header" id="webhooks-header">
<h2>⚡ Webhooks Configuration</h2> <h2>⚡ Webhooks Configuration</h2>
<span class="webhooks-toggle" id="webhooks-toggle"></span> <span class="webhooks-toggle" id="webhooks-toggle"></span>
@@ -129,7 +131,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div id="error-message" class="error-message" style="display: none;"></div> <div id="error-message" class="error-message" style="display: none;"></div>

View File

@@ -1544,16 +1544,6 @@ body {
overflow: hidden; overflow: hidden;
} }
/* When nested inside status-panel, remove outer styling and look like a subsection */
.status-panel > .webhooks-section {
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
margin-bottom: 0;
border-top: 1px solid var(--border);
}
.webhooks-header { .webhooks-header {
padding: 16px 20px; padding: 16px 20px;
background: var(--surface-alt); background: var(--surface-alt);