Add database setup script and fix dark mode visibility

- Add scripts/setup-db.ts to programmatically create missing PocketBase
  collections (period_logs, dailyLogs) with proper relation fields
- Fix dark mode visibility across settings, login, calendar, and dashboard
  components by using semantic CSS tokens and dark: variants
- Add db:setup npm script and document usage in AGENTS.md
- Update vitest config to include scripts directory tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 21:23:20 +00:00
parent ca35b36efa
commit ce80fb1ede
11 changed files with 547 additions and 67 deletions

View File

@@ -12,21 +12,27 @@ function getStatusColors(status: Decision["status"]): {
} {
switch (status) {
case "REST":
return { background: "bg-red-100 border-red-300", text: "text-red-700" };
return {
background:
"bg-red-100 dark:bg-red-900/50 border-red-300 dark:border-red-700",
text: "text-red-700 dark:text-red-300",
};
case "GENTLE":
case "LIGHT":
case "REDUCED":
return {
background: "bg-yellow-100 border-yellow-300",
text: "text-yellow-700",
background:
"bg-yellow-100 dark:bg-yellow-900/50 border-yellow-300 dark:border-yellow-700",
text: "text-yellow-700 dark:text-yellow-300",
};
case "TRAIN":
return {
background: "bg-green-100 border-green-300",
text: "text-green-700",
background:
"bg-green-100 dark:bg-green-900/50 border-green-300 dark:border-green-700",
text: "text-green-700 dark:text-green-300",
};
default:
return { background: "border", text: "text-gray-600" };
return { background: "border", text: "text-muted-foreground" };
}
}