mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
fix: improve version API error handling and fix notification toggle listeners
- Add robust error handling to version API endpoint with fallback responses - Fix duplicate event listeners on notification toggles by cloning elements - Update toggle configuration keys to GLOBAL_EMAIL_ENABLED/GLOBAL_WEBHOOK_ENABLED - Add debug toggles for troubleshooting notification components - Remove visual feedback animations to prevent UI flashing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Toggle Debug Test</title>
|
||||
<script>
|
||||
// Test function to debug toggle behavior
|
||||
function debugToggles() {
|
||||
console.log('=== Toggle Debug Info ===');
|
||||
|
||||
// Check for email toggle
|
||||
const emailToggle = document.getElementById('global-email-toggle');
|
||||
console.log('Email toggle found:', !!emailToggle);
|
||||
if (emailToggle) {
|
||||
console.log('Email toggle checked:', emailToggle.checked);
|
||||
console.log('Email toggle disabled:', emailToggle.disabled);
|
||||
}
|
||||
|
||||
// Check for webhook toggle
|
||||
const webhookToggle = document.getElementById('global-webhook-toggle');
|
||||
console.log('Webhook toggle found:', !!webhookToggle);
|
||||
if (webhookToggle) {
|
||||
console.log('Webhook toggle checked:', webhookToggle.checked);
|
||||
console.log('Webhook toggle disabled:', webhookToggle.disabled);
|
||||
}
|
||||
|
||||
// Check for config sections
|
||||
const emailSection = document.getElementById('email-config-section');
|
||||
console.log('Email config section found:', !!emailSection);
|
||||
if (emailSection) {
|
||||
console.log('Email section opacity:', emailSection.style.opacity);
|
||||
}
|
||||
|
||||
const webhookSection = document.getElementById('webhook-config-section');
|
||||
console.log('Webhook config section found:', !!webhookSection);
|
||||
if (webhookSection) {
|
||||
console.log('Webhook section opacity:', webhookSection.style.opacity);
|
||||
}
|
||||
|
||||
// Check if functions exist
|
||||
console.log('updateEmailConfigVisibility exists:', typeof updateEmailConfigVisibility === 'function');
|
||||
console.log('updateWebhookConfigVisibility exists:', typeof updateWebhookConfigVisibility === 'function');
|
||||
|
||||
console.log('=== End Debug Info ===');
|
||||
}
|
||||
|
||||
// Add this to the browser console
|
||||
window.debugToggles = debugToggles;
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Toggle Debug Test</h1>
|
||||
<p>Open the browser console and run: <code>debugToggles()</code></p>
|
||||
<p>Or add this to the alertManagementModal.js temporarily to debug</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user