Fix CSS import and add debug logging for indicator panel

- Changed @import style to proper <link> tag for indicators-new.css
- Added console logging to initIndicatorPanel for debugging
- Added console logging to renderIndicatorPanel to show filter results
- This should help diagnose empty panel issue
This commit is contained in:
DiTus
2026-02-25 22:46:03 +01:00
parent d0fbe8cfe5
commit ac44b52b8b
2 changed files with 10 additions and 4 deletions

View File

@ -1276,9 +1276,7 @@
}
}
</style>
<style>
@import url(./css/indicators-new.css);
</style>
<link rel="stylesheet" href="./css/indicators-new.css">
</head>
<body>
<div class="toolbar">

View File

@ -32,8 +32,10 @@ const LINE_TYPES = ['solid', 'dotted', 'dashed'];
// Initialize
export function initIndicatorPanel() {
console.log('[IndicatorPanel] Initializing...');
renderIndicatorPanel();
setupEventListeners();
console.log('[IndicatorPanel] Initialized');
}
function getDefaultColor(index) {
@ -97,10 +99,16 @@ export function setActiveIndicators(indicators) {
// Render main panel
export function renderIndicatorPanel() {
const container = document.getElementById('indicatorPanel');
if (!container) return;
if (!container) {
console.error('[IndicatorPanel] Container #indicatorPanel not found!');
return;
}
console.log('[IndicatorPanel] Rendering panel, searchQuery:', searchQuery, 'selectedCategory:', selectedCategory);
const available = getAvailableIndicators();
const catalog = available.filter(ind => {
console.log("[IndicatorPanel] Total indicators:", available.length, "Filtered to:", catalog.length);
if (searchQuery && !ind.name.toLowerCase().includes(searchQuery.toLowerCase())) return false;
if (selectedCategory === 'all') return true;
if (selectedCategory === 'favorites') return false;