feat(dashboard): Add Night Mode widget to dashboard

Add a compact Night Mode widget to the main dashboard that allows:
- Quick toggle of night mode on/off
- View countdown to next scheduled action
- Manual start/stop of all services
- See count of running vs stopped services

The widget links to the full night-mode settings page for detailed
configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
BreakPilot Dev
2026-02-09 00:31:09 -08:00
parent f7487ee240
commit 18838b5273
2 changed files with 243 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import { getStoredRole, isCategoryVisibleForRole, RoleId } from '@/lib/roles'
import { CategoryCard } from '@/components/common/ModuleCard'
import { InfoNote } from '@/components/common/InfoBox'
import { ServiceStatus } from '@/components/common/ServiceStatus'
import { NightModeWidget } from '@/components/dashboard/NightModeWidget'
import Link from 'next/link'
interface Stats {
@@ -111,7 +112,18 @@ export default function DashboardPage() {
))}
</div>
{/* Infrastructure & System Status */}
<h2 className="text-lg font-semibold text-slate-900 mb-4">Infrastruktur</h2>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
{/* Night Mode Widget */}
<NightModeWidget />
{/* System Status */}
<ServiceStatus />
</div>
{/* Recent Activity */}
<h2 className="text-lg font-semibold text-slate-900 mb-4">Aktivitaet</h2>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
{/* Recent DSR */}
<div className="bg-white rounded-xl border border-slate-200 shadow-sm">
@@ -127,9 +139,6 @@ export default function DashboardPage() {
</p>
</div>
</div>
{/* System Status */}
<ServiceStatus />
</div>
{/* Info Box */}