feat: Add new widgets and enhance configuration validation
- Introduced "nutrition_detail_charts", "recovery_charts_panel", and "progress_photos" widgets to the dashboard. - Updated widget configuration validation to support new widgets, including chart days for nutrition and recovery charts. - Enhanced the widget catalog and dashboard layout to include the new features. - Bumped app_dashboard version to 1.7.0 to reflect these additions and improvements.
This commit is contained in:
1 parent
7f833b2cb1
commit
bc91396885
9 files changed
+226
-4
No files matched your search
@@ -13,6 +13,9 @@ import StatusPillsWidget from '../components/dashboard-widgets/StatusPillsWidget
|
||||
import ProfileGoalsProgressWidget from '../components/dashboard-widgets/ProfileGoalsProgressWidget'
|
||||
import TrendKcalWeightWidget from '../components/dashboard-widgets/TrendKcalWeightWidget'
|
||||
import NutritionActivitySummaryWidget from '../components/dashboard-widgets/NutritionActivitySummaryWidget'
|
||||
import NutritionDetailChartsWidget from '../components/dashboard-widgets/NutritionDetailChartsWidget'
|
||||
import RecoveryChartsPanelWidget from '../components/dashboard-widgets/RecoveryChartsPanelWidget'
|
||||
import ProgressPhotosWidget from '../components/dashboard-widgets/ProgressPhotosWidget'
|
||||
import RecoverySleepRestWidget from '../components/dashboard-widgets/RecoverySleepRestWidget'
|
||||
import GoalsFocusTeaserWidget from '../components/dashboard-widgets/GoalsFocusTeaserWidget'
|
||||
import AiPipelineInsightWidget from '../components/dashboard-widgets/AiPipelineInsightWidget'
|
||||
@@ -101,6 +104,27 @@ export function ensurePilotLabWidgetsRegistered() {
|
||||
Component: NutritionActivitySummaryWidget,
|
||||
mapProps: (ctx) => ({ refreshTick: ctx.refreshTick }),
|
||||
})
|
||||
registerDashboardWidget({
|
||||
id: 'nutrition_detail_charts',
|
||||
Component: NutritionDetailChartsWidget,
|
||||
mapProps: (ctx) => ({
|
||||
refreshTick: ctx.refreshTick,
|
||||
chartDays: ctx.layoutEntry?.config?.chart_days,
|
||||
}),
|
||||
})
|
||||
registerDashboardWidget({
|
||||
id: 'recovery_charts_panel',
|
||||
Component: RecoveryChartsPanelWidget,
|
||||
mapProps: (ctx) => ({
|
||||
refreshTick: ctx.refreshTick,
|
||||
chartDays: ctx.layoutEntry?.config?.chart_days,
|
||||
}),
|
||||
})
|
||||
registerDashboardWidget({
|
||||
id: 'progress_photos',
|
||||
Component: ProgressPhotosWidget,
|
||||
mapProps: (ctx) => ({ refreshTick: ctx.refreshTick }),
|
||||
})
|
||||
registerDashboardWidget({
|
||||
id: 'recovery_sleep_rest',
|
||||
Component: RecoverySleepRestWidget,
|
||||
|
||||
Reference in new issue
Block a user