feat(dashboard): comprehensive filter enhancement and UI layout fixes
- Add time range selector (1H/6H/24H/7D/All) with preference persistence - Implement smart X-axis label formatting for multi-day usage data - Standardize global component spacing and fix CSS @apply limitations - Add elegant empty state UI for charts when filtered data is absent - Update i18n translations for all new dashboard features
This commit is contained in:
@@ -8,6 +8,7 @@ window.Components = window.Components || {};
|
||||
window.Components.dashboard = () => ({
|
||||
// Core state
|
||||
stats: { total: 0, active: 0, limited: 0, overallHealth: 0, hasTrendData: false },
|
||||
hasFilteredTrendData: true,
|
||||
charts: { quotaDistribution: null, usageTrend: null },
|
||||
usageStats: { total: 0, today: 0, thisHour: 0 },
|
||||
historyData: {},
|
||||
@@ -165,6 +166,14 @@ window.Components.dashboard = () => ({
|
||||
window.DashboardFilters.setDisplayMode(this, mode);
|
||||
},
|
||||
|
||||
setTimeRange(range) {
|
||||
window.DashboardFilters.setTimeRange(this, range);
|
||||
},
|
||||
|
||||
getTimeRangeLabel() {
|
||||
return window.DashboardFilters.getTimeRangeLabel(this);
|
||||
},
|
||||
|
||||
toggleFamily(family) {
|
||||
window.DashboardFilters.toggleFamily(this, family);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user