Fix: Prevent indicators from being deleted during TF switch

- Remove window.renderIndicatorList() call from renderTA()
- This was triggering initIndicatorPanel during each TF switch
- Added logging to removeIndicatorById to track unexpected deletions
- Removed indicator configuration UI from TA panel (sidebar handles this now)
This commit is contained in:
DiTus
2026-02-26 15:14:34 +01:00
parent 2769814b64
commit 3a8040590b
2 changed files with 20 additions and 19 deletions

View File

@ -499,7 +499,7 @@ async loadTA() {
}
}
renderTA() {
renderTA() {
if (!this.taData || this.taData.error) {
document.getElementById('taContent').innerHTML = `<div class="ta-error">${this.taData?.error || 'No data available'}</div>`;
return;
@ -542,23 +542,7 @@ async loadTA() {
</span>
</div>
</div>
<div class="ta-section">
<div class="ta-section-title">Indicators</div>
<div id="indicatorList" class="indicator-list"></div>
</div>
<div class="ta-section" id="indicatorConfigPanel">
<div class="ta-section-title">Configuration</div>
<div id="configForm" style="margin-top: 8px;"></div>
<div style="display: flex; gap: 8px; margin-top: 12px;" id="configButtons">
<button class="ta-btn" onclick="applyIndicatorConfig()" style="flex: 1; font-size: 11px; background: var(--tv-blue); color: white; border: none;">Apply</button>
<button class="ta-btn" onclick="removeIndicator()" style="flex: 1; font-size: 11px; border-color: var(--tv-red); color: var(--tv-red);">Remove</button>
</div>
</div>
`;
window.renderIndicatorList?.();
}
async loadStats() {