Fix status card regression: revert webhooks-section to sibling structure
All checks were successful
All checks were successful
This commit is contained in:
@@ -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; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user