feat: implement administrative control panel with real-time bot actions

This commit is contained in:
syntaxbullet
2026-01-08 21:19:16 +01:00
parent 3f3a6c88e8
commit 0f6cce9b6e
14 changed files with 499 additions and 47 deletions

View File

@@ -121,7 +121,7 @@ export const dashboardService = {
// Combine and sort by timestamp
const allEvents = [...txEvents, ...modEvents]
.sort((a, b) => b.timestamp.getTime() - a.timestamp.getTime())
.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime())
.slice(0, limit);
return allEvents;
@@ -141,7 +141,7 @@ export const dashboardService = {
const { systemEvents, EVENTS } = await import("@shared/lib/events");
systemEvents.emit(EVENTS.DASHBOARD.NEW_EVENT, {
...fullEvent,
timestamp: fullEvent.timestamp.toISOString()
timestamp: (fullEvent.timestamp as Date).toISOString()
});
} catch (e) {
console.error("Failed to emit system event:", e);