updated
All checks were successful
Deployment / deploy-docker (push) Successful in 17s

This commit is contained in:
Melchior Reimers
2026-01-25 18:41:43 +01:00
parent 66c472be05
commit 9beebe091c

View File

@@ -143,9 +143,6 @@
let isRefreshing = false;
let refreshInterval = null;
let isRefreshing = false;
let refreshInterval = null;
async function fetchData(skipCharts = false) {
if (isRefreshing) return; // Verhindere parallele Aufrufe
isRefreshing = true;
@@ -191,14 +188,24 @@
}
function showView(viewId) {
if (!viewId) viewId = 'dashboard'; // Default zu dashboard
window.activeView = viewId;
document.querySelectorAll('.view').forEach(v => v.classList.add('hidden'));
document.getElementById(`view-${viewId}`).classList.remove('hidden');
const targetView = document.getElementById(`view-${viewId}`);
if (targetView) {
targetView.classList.remove('hidden');
}
document.querySelectorAll('#sidebar a').forEach(a => a.classList.remove('active-nav'));
document.getElementById(`nav-${viewId}`).classList.add('active-nav');
const targetNav = document.getElementById(`nav-${viewId}`);
if (targetNav) {
targetNav.classList.add('active-nav');
}
const titles = { 'dashboard': 'Market Overview', 'custom-analytics': 'Custom Analytics' };
document.getElementById('pageTitle').innerText = titles[viewId] || 'Dashboard';
const pageTitle = document.getElementById('pageTitle');
if (pageTitle) {
pageTitle.innerText = titles[viewId] || 'Dashboard';
}
updateUrlParams();
}
@@ -764,6 +771,9 @@
document.getElementById('customDateFrom').value = thirtyDaysAgo.toISOString().split('T')[0];
}
// Initialisiere Dashboard-View
showView('dashboard');
await fetchData();
loadFromUrlParams();