fix(ui): Integrate webhooks panel into status panel
All checks were successful
All checks were successful
The webhooks panel was appearing separately from the status panel. Now it's properly nested inside the status-panel div: - Moved webhooks-section inside status-panel in HTML - Updated CSS so nested webhooks looks like a subsection (no double borders) - Simplified JS toggle logic - webhooks shows/hides automatically with status panel - Admin users see webhooks inside status panel, collapsed by default
This commit is contained in:
@@ -772,20 +772,22 @@ async function toggleStatusPanel() {
|
||||
const panel = document.getElementById('status-panel');
|
||||
const webhooksSection = document.getElementById('webhooks-section');
|
||||
if (panel.style.display !== 'none') {
|
||||
// Close both panels (webhooks is nested, but hide explicitly)
|
||||
panel.style.display = 'none';
|
||||
if (webhooksSection) webhooksSection.style.display = 'none';
|
||||
if (statusRefreshHandle) { clearInterval(statusRefreshHandle); statusRefreshHandle = null; }
|
||||
return;
|
||||
}
|
||||
// Open status panel (contains webhooks nested inside)
|
||||
panel.style.display = 'block';
|
||||
// Show webhooks section for admin users (collapsed by default)
|
||||
if (webhooksSection && isAdmin) {
|
||||
webhooksSection.style.display = '';
|
||||
// Ensure webhooks section starts collapsed
|
||||
webhooksSection.style.display = 'block';
|
||||
webhookSectionExpanded = false;
|
||||
document.getElementById('webhooks-content').style.display = 'none';
|
||||
document.getElementById('webhooks-toggle').classList.remove('expanded');
|
||||
await fetchWebhookStatus();
|
||||
} else if (webhooksSection) {
|
||||
webhooksSection.style.display = 'none';
|
||||
}
|
||||
await refreshStatusPanel();
|
||||
if (statusRefreshHandle) clearInterval(statusRefreshHandle);
|
||||
@@ -794,8 +796,6 @@ async function toggleStatusPanel() {
|
||||
|
||||
function closeStatusPanel() {
|
||||
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; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user