refactor(settings): fold Labs, Vorsorge, and Illness into the shell

Promote the three per-module customise surfaces from standalone
ModuleSettingsFrame pages to first-class Settings sections. They now
render inside the Settings shell — same left nav, heading, and chrome as
account / ai / integrations / notifications — instead of their own
back-button-and-title frame outside it.

Add labs, illness, and vorsorge to the slug registry (after mood) and to
SETTINGS_SECTIONS with FlaskConical / Thermometer / CalendarCheck icons.
labs and illness gate on their toggleable modules; vorsorge has no
module, so its entry is always shown. Three thin section components wrap
the existing LabsSettings / IllnessSettings / VorsorgeSettings content,
mirroring MedicationsSection / CoachSection.

Delete the three standalone /settings/{labs,vorsorge,illness} routes so
the wrench deep links resolve through the dynamic [section] route, and
drop ModuleSettingsFrame now that nothing renders it. Add the section
title / subtitle / description keys across all six locales and remove the
dead per-module *.settings.* blocks the old pages consumed.
This commit is contained in:
Marc-André Bombeck committed 2026-06-19 21:06:25 +02:00
1 parent 3e04035de8
commit 43d9610f03
18 files changed
+217 -253

No files matched your search

@@ -1,42 +0,0 @@
"use client";
import type { ReactNode } from "react";
import { SettingsHubBackLink } from "@/components/settings/settings-hub-back-link";
import { SettingsSectionFrame } from "@/components/settings/settings-section-frame";
/**
* v1.18.6 (W8 / MOD-03) — heading frame for the per-module settings pages
* (Vorsorge / Illness / Labs).
*
* Delegates to the shared `SettingsSectionFrame` so every settings page — the
* 19 shell sections and these three per-module pages — renders one identical
* heading frame. These pages stay out of the slug registry (their static
* routes win over `/settings/[section]`), so they drive the frame's explicit
* title/subtitle mode and supply the "return to the module" back-link through
* the frame's `topSlot`, which sits above the heading.
*/
export function ModuleSettingsFrame({
title,
description,
backHref,
backLabelKey,
children,
}: {
title: string;
description: string;
/** Where the "← back" link returns to — the module's own page. */
backHref: string;
backLabelKey: string;
children: ReactNode;
}) {
return (
<SettingsSectionFrame
title={title}
subtitle={description}
topSlot={<SettingsHubBackLink href={backHref} labelKey={backLabelKey} />}
>
{children}
</SettingsSectionFrame>
);
}