feat(dashboard): add Recent Events widget for v2 system
- Add registerRecentEventsWidget() in infoBoxWidgets.js - Implement notebook-style UI with rings, bullet points, and editable events - Support max 3 events with + placeholders for new entries - Parse 'Recent Events: event1, event2, event3' format from infoBox - Register widget in dashboardIntegration.js - Add to default layout Scene tab (row 4-5, below location) - Integrate with tracker system: - Add to WIDGET_TO_TAB_MAP (maps to tab-scene) - Add to shouldWidgetBeRemoved() rules - Add to detectConfigChanges() for re-addition support - Completes v2 widget migration - all tracker features now have widgets
This commit is contained in:
@@ -1681,6 +1681,7 @@ export class DashboardManager {
|
||||
'temperature': 'tab-scene',
|
||||
'clock': 'tab-scene',
|
||||
'location': 'tab-scene',
|
||||
'recentEvents': 'tab-scene',
|
||||
'presentCharacters': 'tab-scene',
|
||||
'userStats': 'tab-status',
|
||||
'userInfo': 'tab-status',
|
||||
@@ -1705,13 +1706,14 @@ export class DashboardManager {
|
||||
|
||||
const widgetsToAdd = [];
|
||||
|
||||
// Check infoBox widgets (calendar, weather, temperature, clock, location)
|
||||
// Check infoBox widgets (calendar, weather, temperature, clock, location, recentEvents)
|
||||
const infoBoxWidgetMap = {
|
||||
'date': 'calendar',
|
||||
'weather': 'weather',
|
||||
'temperature': 'temperature',
|
||||
'time': 'clock',
|
||||
'location': 'location'
|
||||
'location': 'location',
|
||||
'recentEvents': 'recentEvents'
|
||||
};
|
||||
|
||||
Object.entries(infoBoxWidgetMap).forEach(([fieldKey, widgetType]) => {
|
||||
@@ -1961,6 +1963,7 @@ export class DashboardManager {
|
||||
'temperature': () => config.infoBox?.widgets?.temperature?.enabled === false,
|
||||
'clock': () => config.infoBox?.widgets?.time?.enabled === false,
|
||||
'location': () => config.infoBox?.widgets?.location?.enabled === false,
|
||||
'recentEvents': () => config.infoBox?.widgets?.recentEvents?.enabled === false,
|
||||
'userStats': () => {
|
||||
const customStats = config.userStats?.customStats || [];
|
||||
return customStats.filter(s => s.enabled).length === 0;
|
||||
|
||||
Reference in New Issue
Block a user