- Fixed TA panel loading state - now waits for initial data before loading technical analysis - Changed initial loading message from 'Loading technical analysis...' to 'Waiting for candle data...' - Made strategy simulation sidebar collapsed by default to maximize chart area - Added refresh timestamp to TA panel when manually refreshed - Improved error messages for when data isn't available in database
25 lines
915 B
JavaScript
25 lines
915 B
JavaScript
export function toggleSidebar() {
|
|
const sidebar = document.getElementById('rightSidebar');
|
|
sidebar.classList.toggle('collapsed');
|
|
localStorage.setItem('sidebar_collapsed', sidebar.classList.contains('collapsed'));
|
|
|
|
// Resize chart after sidebar toggle
|
|
setTimeout(() => {
|
|
if (window.dashboard && window.dashboard.chart) {
|
|
const container = document.getElementById('chart');
|
|
window.dashboard.chart.applyOptions({
|
|
width: container.clientWidth,
|
|
height: container.clientHeight
|
|
});
|
|
}
|
|
}, 350); // Wait for CSS transition
|
|
}
|
|
|
|
export function restoreSidebarState() {
|
|
const collapsed = localStorage.getItem('sidebar_collapsed') !== 'false'; // Default to collapsed
|
|
const sidebar = document.getElementById('rightSidebar');
|
|
if (collapsed && sidebar) {
|
|
sidebar.classList.add('collapsed');
|
|
}
|
|
}
|