ui: major UX polish and bug fixes for dashboard

- Added global loading spinner and page transitions.
- Improved sidebar with tooltips and persistent collapsed state.
- Fixed chart memory leaks by properly destroying instances on page change.
- Unified WebSocket event handling and status indicators.
- Refined stat cards, tables, and modal interactions.
- Added real backend integration for logout and session management.
This commit is contained in:
2026-02-26 15:48:01 -05:00
parent b52e0e3af0
commit 2c5a6a596b
6 changed files with 202 additions and 51 deletions

View File

@@ -77,12 +77,18 @@ class ClientsPage {
try {
const data = await window.api.get('/usage/clients');
if (!data || data.length === 0) {
const canvas = document.getElementById('client-usage-chart');
if (canvas) canvas.closest('.chart-container').style.display = 'none';
return;
}
const chartData = {
labels: data.map(item => item.client_id),
datasets: [{
label: 'Requests',
data: data.map(item => item.requests),
color: '#3b82f6'
color: '#6366f1'
}]
};