mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
Cmd/Ctrl+K or the search control at the end of the top bar opens a combobox over a client-side index built from the lists the navigation already renders: pages, Insights pages, every Settings section and card (deep-linked by a new anchor prop on SettingsCardHeader), the Appearance sub-pages, module switches and a few actions. Entries follow the module map, the Coach capability, the admin role and a shared record's grant; inside somebody else's record no cards, switches or backup are offered. Ranking is prefix, then word start, then substring, then a small edit distance, then subsequence, with a short multilingual synonym list. The empty state shows recent places (per account, in localStorage) and the main actions. The palette is its own lazily loaded chunk; the top bar shows a search field where it has room and a magnifier otherwise. The module switch mutation moves into a shared hook used by the Modules hub and the palette.
58 lines
1.4 KiB
TypeScript
58 lines
1.4 KiB
TypeScript
import {
|
|
Activity,
|
|
Award,
|
|
Brain,
|
|
CalendarHeart,
|
|
CloudSun,
|
|
Droplet,
|
|
Dumbbell,
|
|
FileScan,
|
|
FileText,
|
|
History,
|
|
Leaf,
|
|
MessageCircleHeart,
|
|
Moon,
|
|
Pill,
|
|
Plug,
|
|
Smile,
|
|
Sparkles,
|
|
Syringe,
|
|
TestTube,
|
|
Thermometer,
|
|
type LucideIcon,
|
|
} from "lucide-react";
|
|
|
|
import type { ModuleKey } from "@/lib/modules/registry";
|
|
|
|
/** Neutral Lucide glyph per toggleable module. */
|
|
export const MODULE_ICONS: Record<ModuleKey, LucideIcon> = {
|
|
cycle: CalendarHeart,
|
|
mood: Smile,
|
|
sleep: Moon,
|
|
glucose: Droplet,
|
|
workouts: Dumbbell,
|
|
recovery: Activity,
|
|
labs: TestTube,
|
|
illness: Thermometer,
|
|
achievements: Award,
|
|
coach: MessageCircleHeart,
|
|
insights: Sparkles,
|
|
// v1.18.1 (D3) — medications graduated from CORE to a toggleable module.
|
|
medications: Pill,
|
|
doctorReport: FileText,
|
|
// v1.25.0 — the environmental-context module (opt-in weather/daylight feed).
|
|
environment: CloudSun,
|
|
// v1.22.0 — the remote MCP endpoint (opt-in connectivity module).
|
|
mcp: Plug,
|
|
// v1.25.0 (W-DOCS-IN) — inbound clinical documents (opt-in).
|
|
inboundDocuments: FileScan,
|
|
// v1.25.0 — opt-in mental-health screeners (PHQ-9 / GAD-7).
|
|
mentalHealth: Brain,
|
|
// v1.28 — opt-in micronutrient-intake sync (Apple Health day totals).
|
|
nutrients: Leaf,
|
|
// v1.38.0 — the immunization log.
|
|
vaccinations: Syringe,
|
|
// v1.42 — the life timeline (opt-in).
|
|
timeline: History,
|
|
};
|