mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
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:
1 parent
3e04035de8
commit
43d9610f03
18 files changed
+217
-253
No files matched your search
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Gruppen, Tags und archivierte Tags der Stimmungs-Auswahl.",
|
||||
"subtitle": "Organisiere deine Stimmungs-Tags, Gruppen und Auswahlreihenfolge."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Laborwerte",
|
||||
"description": "Ansicht, Sortierung und Biomarker deiner Laborwerte.",
|
||||
"subtitle": "Ansicht, Sortierung und Biomarker verwalten."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Krankheitstagebuch",
|
||||
"description": "Ansicht und Reihenfolge deiner Krankheitsepisoden.",
|
||||
"subtitle": "Ansicht und Reihenfolge der Episoden verwalten."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Vorsorge",
|
||||
"description": "Ansicht, Reihenfolge und einzelne Vorsorge-Erinnerungen.",
|
||||
"subtitle": "Ansicht, Reihenfolge und einzelne Erinnerungen verwalten."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Module",
|
||||
"saved": "Gespeichert.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "Im Plan",
|
||||
"due": "Jetzt fällig"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Vorsorge anpassen",
|
||||
"description": "Ansicht, Reihenfolge und einzelne Erinnerungen verwalten.",
|
||||
"back": "Zurück zur Vorsorge"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Messwert erfassen",
|
||||
"description": "Wert eintragen; die Erinnerung wird als erledigt markiert."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "Wert konnte nicht gelöscht werden",
|
||||
"loadError": "Laborwerte konnten nicht geladen werden",
|
||||
"customize": "Laborwerte anpassen",
|
||||
"settings": {
|
||||
"title": "Laborwerte anpassen",
|
||||
"description": "Ansicht, Sortierung und Biomarker verwalten.",
|
||||
"back": "Zurück zu den Laborwerten"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Sortierung",
|
||||
"label": "Reihenfolge der Werte",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Krankheitstagebuch",
|
||||
"subtitle": "Ein rückblickendes Protokoll deiner Krankheits- und Beschwerde-Episoden.",
|
||||
"customize": "Krankheitstagebuch anpassen",
|
||||
"settings": {
|
||||
"title": "Krankheitstagebuch anpassen",
|
||||
"description": "Ansicht und Reihenfolge der Episoden verwalten.",
|
||||
"back": "Zurück zum Krankheitstagebuch"
|
||||
},
|
||||
"newEpisode": "Neue Episode",
|
||||
"logDay": "Tag erfassen",
|
||||
"markRecovered": "Als genesen markieren",
|
||||
|
||||
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Groups, tags, and archived tags for the mood picker.",
|
||||
"subtitle": "Organize your mood tags, groups, and picker order."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Labs",
|
||||
"description": "View, sort order, and biomarkers for your labs.",
|
||||
"subtitle": "Manage the view, sort order, and biomarkers."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Illness journal",
|
||||
"description": "View and order of your illness episodes.",
|
||||
"subtitle": "Manage the view and order of episodes."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Preventive care",
|
||||
"description": "View, order, and individual preventive-care reminders.",
|
||||
"subtitle": "Manage the view, order, and individual reminders."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Modules",
|
||||
"saved": "Saved.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "On track",
|
||||
"due": "Due now"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Customize preventive care",
|
||||
"description": "Manage the view, order, and individual reminders.",
|
||||
"back": "Back to preventive care"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Log measurement",
|
||||
"description": "Enter the reading; the reminder is marked done."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "Could not delete the result",
|
||||
"loadError": "Could not load lab results",
|
||||
"customize": "Customize labs",
|
||||
"settings": {
|
||||
"title": "Customize labs",
|
||||
"description": "Manage the view, sort order, and biomarkers.",
|
||||
"back": "Back to labs"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Sort order",
|
||||
"label": "Order of values",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Illness journal",
|
||||
"subtitle": "A retrospective log of your illness and condition episodes.",
|
||||
"customize": "Customize illness journal",
|
||||
"settings": {
|
||||
"title": "Customize illness journal",
|
||||
"description": "Manage the view and order of episodes.",
|
||||
"back": "Back to the illness journal"
|
||||
},
|
||||
"newEpisode": "New episode",
|
||||
"logDay": "Log a day",
|
||||
"markRecovered": "Mark recovered",
|
||||
|
||||
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Grupos, etiquetas y etiquetas archivadas del selector de ánimo.",
|
||||
"subtitle": "Organiza tus etiquetas de ánimo, grupos y orden del selector."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Laboratorio",
|
||||
"description": "Vista, orden y biomarcadores de tu laboratorio.",
|
||||
"subtitle": "Gestiona la vista, el orden y los biomarcadores."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Diario de enfermedad",
|
||||
"description": "Vista y orden de tus episodios de enfermedad.",
|
||||
"subtitle": "Gestiona la vista y el orden de los episodios."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Prevención",
|
||||
"description": "Vista, orden y recordatorios de prevención individuales.",
|
||||
"subtitle": "Gestiona la vista, el orden y los recordatorios individuales."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Módulos",
|
||||
"saved": "Guardado.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "Al día",
|
||||
"due": "Toca ahora"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Personalizar prevención",
|
||||
"description": "Gestiona la vista, el orden y los recordatorios individuales.",
|
||||
"back": "Volver a prevención"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Registrar medición",
|
||||
"description": "Introduce el valor; el recordatorio se marca como hecho."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "No se pudo eliminar el resultado",
|
||||
"loadError": "No se pudieron cargar los resultados",
|
||||
"customize": "Personalizar laboratorio",
|
||||
"settings": {
|
||||
"title": "Personalizar laboratorio",
|
||||
"description": "Gestiona la vista, el orden y los biomarcadores.",
|
||||
"back": "Volver al laboratorio"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Orden",
|
||||
"label": "Orden de los valores",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Diario de enfermedad",
|
||||
"subtitle": "Un registro retrospectivo de tus episodios de enfermedad y dolencias.",
|
||||
"customize": "Personalizar diario de enfermedad",
|
||||
"settings": {
|
||||
"title": "Personalizar diario de enfermedad",
|
||||
"description": "Gestiona la vista y el orden de los episodios.",
|
||||
"back": "Volver al diario de enfermedad"
|
||||
},
|
||||
"newEpisode": "Nuevo episodio",
|
||||
"logDay": "Registrar un día",
|
||||
"markRecovered": "Marcar como recuperado",
|
||||
|
||||
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Groupes, étiquettes et étiquettes archivées du sélecteur d’humeur.",
|
||||
"subtitle": "Organisez vos tags d'humeur, groupes et ordre du sélecteur."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Analyses",
|
||||
"description": "Affichage, tri et biomarqueurs de vos analyses.",
|
||||
"subtitle": "Gérez l’affichage, le tri et les biomarqueurs."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Journal de maladie",
|
||||
"description": "Affichage et ordre de vos épisodes de maladie.",
|
||||
"subtitle": "Gérez l’affichage et l’ordre des épisodes."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Prévention",
|
||||
"description": "Affichage, ordre et rappels de prévention individuels.",
|
||||
"subtitle": "Gérez l’affichage, l’ordre et les rappels individuels."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Modules",
|
||||
"saved": "Enregistré.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "Dans les temps",
|
||||
"due": "À faire maintenant"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Personnaliser la prévention",
|
||||
"description": "Gérer l'affichage, l'ordre et les rappels individuels.",
|
||||
"back": "Retour à la prévention"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Enregistrer une mesure",
|
||||
"description": "Saisissez la valeur ; le rappel est marqué comme fait."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "Impossible de supprimer le résultat",
|
||||
"loadError": "Impossible de charger les résultats",
|
||||
"customize": "Personnaliser les analyses",
|
||||
"settings": {
|
||||
"title": "Personnaliser les analyses",
|
||||
"description": "Gérer l'affichage, le tri et les biomarqueurs.",
|
||||
"back": "Retour aux analyses"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Tri",
|
||||
"label": "Ordre des valeurs",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Journal de maladie",
|
||||
"subtitle": "Un suivi rétrospectif de vos épisodes de maladie et d'affections.",
|
||||
"customize": "Personnaliser le journal de maladie",
|
||||
"settings": {
|
||||
"title": "Personnaliser le journal de maladie",
|
||||
"description": "Gérer l'affichage et l'ordre des épisodes.",
|
||||
"back": "Retour au journal de maladie"
|
||||
},
|
||||
"newEpisode": "Nouvel épisode",
|
||||
"logDay": "Enregistrer un jour",
|
||||
"markRecovered": "Marquer comme rétabli",
|
||||
|
||||
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Gruppi, tag e tag archiviati del selettore dell’umore.",
|
||||
"subtitle": "Organizza i tag dell'umore, i gruppi e l'ordine del selettore."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Esami",
|
||||
"description": "Vista, ordinamento e biomarcatori dei tuoi esami.",
|
||||
"subtitle": "Gestisci la vista, l’ordinamento e i biomarcatori."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Diario delle malattie",
|
||||
"description": "Vista e ordine dei tuoi episodi di malattia.",
|
||||
"subtitle": "Gestisci la vista e l’ordine degli episodi."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Prevenzione",
|
||||
"description": "Vista, ordine e singoli promemoria di prevenzione.",
|
||||
"subtitle": "Gestisci la vista, l’ordine e i singoli promemoria."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Moduli",
|
||||
"saved": "Salvato.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "In linea",
|
||||
"due": "Da fare ora"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Personalizza prevenzione",
|
||||
"description": "Gestisci la vista, l'ordine e i singoli promemoria.",
|
||||
"back": "Torna alla prevenzione"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Registra misurazione",
|
||||
"description": "Inserisci il valore; il promemoria viene segnato come fatto."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "Impossibile eliminare il risultato",
|
||||
"loadError": "Impossibile caricare i risultati",
|
||||
"customize": "Personalizza esami",
|
||||
"settings": {
|
||||
"title": "Personalizza esami",
|
||||
"description": "Gestisci la vista, l'ordinamento e i biomarcatori.",
|
||||
"back": "Torna agli esami"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Ordinamento",
|
||||
"label": "Ordine dei valori",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Diario delle malattie",
|
||||
"subtitle": "Un registro retrospettivo dei tuoi episodi di malattia e disturbi.",
|
||||
"customize": "Personalizza diario delle malattie",
|
||||
"settings": {
|
||||
"title": "Personalizza diario delle malattie",
|
||||
"description": "Gestisci la vista e l'ordine degli episodi.",
|
||||
"back": "Torna al diario delle malattie"
|
||||
},
|
||||
"newEpisode": "Nuovo episodio",
|
||||
"logDay": "Registra un giorno",
|
||||
"markRecovered": "Segna come guarito",
|
||||
|
||||
+15
-15
@@ -4025,6 +4025,21 @@
|
||||
"description": "Grupy, tagi i zarchiwizowane tagi w wyborze nastroju.",
|
||||
"subtitle": "Uporządkuj tagi nastroju, grupy i kolejność wyboru."
|
||||
},
|
||||
"labs": {
|
||||
"title": "Wyniki badań",
|
||||
"description": "Widok, sortowanie i biomarkery Twoich wyników badań.",
|
||||
"subtitle": "Zarządzaj widokiem, sortowaniem i biomarkerami."
|
||||
},
|
||||
"illness": {
|
||||
"title": "Dziennik chorób",
|
||||
"description": "Widok i kolejność Twoich epizodów chorobowych.",
|
||||
"subtitle": "Zarządzaj widokiem i kolejnością epizodów."
|
||||
},
|
||||
"vorsorge": {
|
||||
"title": "Profilaktyka",
|
||||
"description": "Widok, kolejność i poszczególne przypomnienia profilaktyczne.",
|
||||
"subtitle": "Zarządzaj widokiem, kolejnością i poszczególnymi przypomnieniami."
|
||||
},
|
||||
"modules": {
|
||||
"title": "Moduły",
|
||||
"saved": "Zapisano.",
|
||||
@@ -6407,11 +6422,6 @@
|
||||
"onTrack": "Zgodnie z planem",
|
||||
"due": "Termin teraz"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Dostosuj profilaktykę",
|
||||
"description": "Zarządzaj widokiem, kolejnością i poszczególnymi przypomnieniami.",
|
||||
"back": "Powrót do profilaktyki"
|
||||
},
|
||||
"capture": {
|
||||
"title": "Zapisz pomiar",
|
||||
"description": "Wpisz wartość; przypomnienie zostanie oznaczone jako wykonane."
|
||||
@@ -6461,11 +6471,6 @@
|
||||
"deleteError": "Nie udało się usunąć wyniku",
|
||||
"loadError": "Nie udało się wczytać wyników",
|
||||
"customize": "Dostosuj wyniki badań",
|
||||
"settings": {
|
||||
"title": "Dostosuj wyniki badań",
|
||||
"description": "Zarządzaj widokiem, sortowaniem i biomarkerami.",
|
||||
"back": "Powrót do wyników badań"
|
||||
},
|
||||
"sort": {
|
||||
"heading": "Sortowanie",
|
||||
"label": "Kolejność wartości",
|
||||
@@ -6664,11 +6669,6 @@
|
||||
"title": "Dziennik chorób",
|
||||
"subtitle": "Retrospektywny zapis Twoich epizodów chorób i dolegliwości.",
|
||||
"customize": "Dostosuj dziennik chorób",
|
||||
"settings": {
|
||||
"title": "Dostosuj dziennik chorób",
|
||||
"description": "Zarządzaj widokiem i kolejnością epizodów.",
|
||||
"back": "Powrót do dziennika chorób"
|
||||
},
|
||||
"newEpisode": "Nowy epizod",
|
||||
"logDay": "Zapisz dzień",
|
||||
"markRecovered": "Oznacz jako wyleczone",
|
||||
|
||||
@@ -10,14 +10,17 @@ import { CoachSection } from "@/components/settings/coach-section";
|
||||
import { DashboardSection } from "@/components/settings/dashboard-section";
|
||||
import { ExportSection } from "@/components/settings/export-section";
|
||||
import { GesundheitsakteSection } from "@/components/settings/gesundheitsakte-section";
|
||||
import { IllnessSection } from "@/components/settings/illness-section";
|
||||
import { InsightsSection } from "@/components/settings/insights-section";
|
||||
import { IntegrationsSection } from "@/components/settings/integrations-section";
|
||||
import { LabsSection } from "@/components/settings/labs-section";
|
||||
import { LayoutSection } from "@/components/settings/layout-section";
|
||||
import { MedicationsSection } from "@/components/settings/medications-section";
|
||||
import { ModulesSection } from "@/components/settings/modules-section";
|
||||
import { MoodSection } from "@/components/settings/mood-section";
|
||||
import { NotificationsSection } from "@/components/settings/notifications-section";
|
||||
import { SectionPlaceholder } from "@/components/settings/section-placeholder";
|
||||
import { VorsorgeSection } from "@/components/settings/vorsorge-section";
|
||||
// v1.18.1 (D4) — `channels` and `sources` are standalone left-side entries
|
||||
// again (split out of the Integrations sub-tabs).
|
||||
import { ChannelsSection } from "@/components/settings/channels-section";
|
||||
@@ -64,6 +67,9 @@ const SECTION_COMPONENTS: Record<
|
||||
insights: InsightsSection,
|
||||
medications: MedicationsSection,
|
||||
mood: MoodSection,
|
||||
labs: LabsSection,
|
||||
illness: IllnessSection,
|
||||
vorsorge: VorsorgeSection,
|
||||
thresholds: ThresholdsSection,
|
||||
api: ApiSection,
|
||||
gesundheitsakte: GesundheitsakteSection,
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { useMounted } from "@/hooks/use-mounted";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame";
|
||||
import { IllnessSettings } from "@/components/illness/illness-settings";
|
||||
|
||||
/**
|
||||
* v1.18.6 (W8 / MOD-03) — the Illness module's own settings page. Dedicated
|
||||
* static route (wins over `/settings/[section]`); reached from the wrench
|
||||
* beside the Illness page's "hinzufügen" button.
|
||||
*/
|
||||
export default function IllnessSettingsPage() {
|
||||
const { isLoading } = useAuth();
|
||||
const mounted = useMounted();
|
||||
const { t } = useTranslations();
|
||||
|
||||
if (!mounted || isLoading) {
|
||||
return (
|
||||
<div className="flex min-h-[40vh] items-center justify-center">
|
||||
<Loader2 className="text-muted-foreground h-6 w-6 animate-spin motion-reduce:animate-none" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ModuleSettingsFrame
|
||||
title={t("illness.settings.title")}
|
||||
description={t("illness.settings.description")}
|
||||
backHref="/illness"
|
||||
backLabelKey="illness.settings.back"
|
||||
>
|
||||
<IllnessSettings />
|
||||
</ModuleSettingsFrame>
|
||||
);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { useMounted } from "@/hooks/use-mounted";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame";
|
||||
import { LabsSettings } from "@/components/labs/labs-settings";
|
||||
|
||||
/**
|
||||
* v1.18.6 (W8 / MOD-03 + MOD-04) — the Labs module's own settings page.
|
||||
* Dedicated static route (wins over `/settings/[section]`); reached from the
|
||||
* wrench beside the Labs page's "hinzufügen" button.
|
||||
*/
|
||||
export default function LabsSettingsPage() {
|
||||
const { isLoading } = useAuth();
|
||||
const mounted = useMounted();
|
||||
const { t } = useTranslations();
|
||||
|
||||
if (!mounted || isLoading) {
|
||||
return (
|
||||
<div className="flex min-h-[40vh] items-center justify-center">
|
||||
<Loader2 className="text-muted-foreground h-6 w-6 animate-spin motion-reduce:animate-none" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ModuleSettingsFrame
|
||||
title={t("labs.settings.title")}
|
||||
description={t("labs.settings.description")}
|
||||
backHref="/labs"
|
||||
backLabelKey="labs.settings.back"
|
||||
>
|
||||
<LabsSettings />
|
||||
</ModuleSettingsFrame>
|
||||
);
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { useMounted } from "@/hooks/use-mounted";
|
||||
import { useTranslations } from "@/lib/i18n/context";
|
||||
import { ModuleSettingsFrame } from "@/components/module-list/module-settings-frame";
|
||||
import { VorsorgeSettings } from "@/components/measurement-reminders/vorsorge-settings";
|
||||
|
||||
/**
|
||||
* v1.18.6 (W8 / MOD-03) — the Vorsorge module's own settings page.
|
||||
*
|
||||
* A dedicated static route that wins over the dynamic `/settings/[section]`
|
||||
* router (static segments take precedence in Next.js), so it adds a
|
||||
* per-module settings surface without touching the parallel-phase-owned
|
||||
* `section-slugs` registry or `settings-shell`. Reached from the wrench
|
||||
* beside the Vorsorge page's "hinzufügen" button.
|
||||
*/
|
||||
export default function VorsorgeSettingsPage() {
|
||||
const { isLoading } = useAuth();
|
||||
const mounted = useMounted();
|
||||
const { t } = useTranslations();
|
||||
|
||||
if (!mounted || isLoading) {
|
||||
return (
|
||||
<div className="flex min-h-[40vh] items-center justify-center">
|
||||
<Loader2 className="text-muted-foreground h-6 w-6 animate-spin motion-reduce:animate-none" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ModuleSettingsFrame
|
||||
title={t("measurementReminders.settings.title")}
|
||||
description={t("measurementReminders.settings.description")}
|
||||
backHref="/vorsorge"
|
||||
backLabelKey="measurementReminders.settings.back"
|
||||
>
|
||||
<VorsorgeSettings />
|
||||
</ModuleSettingsFrame>
|
||||
);
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -91,6 +91,9 @@ describe("SETTINGS_SECTION_SLUGS", () => {
|
||||
// sits right after `ai`.
|
||||
// v1.18.1 (D4) — `channels` + `sources` split out of the Integrations
|
||||
// sub-tabs into their own left-side entries, right after `integrations`.
|
||||
// v1.18.7 — `labs`, `illness`, `vorsorge` move into the shell as
|
||||
// first-class sections, right after `mood` (the three were standalone
|
||||
// `ModuleSettingsFrame` pages).
|
||||
expect([...SETTINGS_SECTION_SLUGS]).toEqual([
|
||||
"account",
|
||||
"modules",
|
||||
@@ -103,6 +106,9 @@ describe("SETTINGS_SECTION_SLUGS", () => {
|
||||
"insights",
|
||||
"medications",
|
||||
"mood",
|
||||
"labs",
|
||||
"illness",
|
||||
"vorsorge",
|
||||
"thresholds",
|
||||
"ai",
|
||||
"coach",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* v1.18.7 — Settings → Krankheitstagebuch.
|
||||
*
|
||||
* The illness-journal customise surface (list view + episode order) was a
|
||||
* standalone `ModuleSettingsFrame` page at `/settings/illness`; it now
|
||||
* renders as a first-class Settings section. The shell supplies the page
|
||||
* chrome (left nav, heading, subtitle) so this body is the illness cards
|
||||
* only. The nav entry is module-gated on `illness`.
|
||||
*/
|
||||
|
||||
import { IllnessSettings } from "@/components/illness/illness-settings";
|
||||
|
||||
export function IllnessSection() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<IllnessSettings />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* v1.18.7 — Settings → Labor.
|
||||
*
|
||||
* The labs customise surface (list view, sort order, biomarker management)
|
||||
* was a standalone `ModuleSettingsFrame` page at `/settings/labs`; it now
|
||||
* renders as a first-class Settings section. The shell supplies the page
|
||||
* chrome (left nav, heading, subtitle) so this body is the labs cards only —
|
||||
* the same pattern the other module-gated sections (Medikamente, Coach,
|
||||
* Stimmung) follow. The nav entry is module-gated on `labs`.
|
||||
*/
|
||||
|
||||
import { LabsSettings } from "@/components/labs/labs-settings";
|
||||
|
||||
export function LabsSection() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<LabsSettings />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -15,8 +15,10 @@ import {
|
||||
Bell,
|
||||
Blocks,
|
||||
Bot,
|
||||
CalendarCheck,
|
||||
Download,
|
||||
FileHeart,
|
||||
FlaskConical,
|
||||
Info,
|
||||
KeyRound,
|
||||
Layers,
|
||||
@@ -28,6 +30,7 @@ import {
|
||||
SlidersHorizontal,
|
||||
Smile,
|
||||
Sparkles,
|
||||
Thermometer,
|
||||
TrendingUp,
|
||||
User,
|
||||
type LucideIcon,
|
||||
@@ -49,6 +52,9 @@ const SLUG_ICON: Record<SettingsSectionSlug, LucideIcon> = {
|
||||
insights: TrendingUp,
|
||||
medications: Pill,
|
||||
mood: Smile,
|
||||
labs: FlaskConical,
|
||||
illness: Thermometer,
|
||||
vorsorge: CalendarCheck,
|
||||
thresholds: SlidersHorizontal,
|
||||
ai: Sparkles,
|
||||
coach: Bot,
|
||||
|
||||
@@ -22,6 +22,16 @@
|
||||
// v1.17 — `mood` sits after `medications`: the mood-tag management
|
||||
// surface (groups, custom tags, hide/archive, picker order), reached
|
||||
// from the /mood page header's wrench glyph.
|
||||
// v1.18.7 — `labs`, `illness`, and `vorsorge` move INTO the Settings
|
||||
// shell as first-class sections, right after `mood`, so the three
|
||||
// tracking-domain customise surfaces sit together. They were standalone
|
||||
// `ModuleSettingsFrame` pages (their own back-button + title, outside the
|
||||
// shell); now the dynamic `[section]` route renders them in shell chrome
|
||||
// 1:1 with the other sections. The wrench deep-links (`/settings/labs`,
|
||||
// `/settings/illness`, `/settings/vorsorge`) are unchanged — they now
|
||||
// resolve through the shell. `labs` + `illness` are module-gated (they are
|
||||
// toggleable modules); `vorsorge` (preventive-care reminders) is not a
|
||||
// module, so its entry is always shown.
|
||||
// v1.17.1 (F-2) — `layout` is the one "Layout & Personalization" home.
|
||||
// The dashboard / insights / medications / mood personalization editors
|
||||
// each keep their own route (deep links, page-header cogs, and the hub's
|
||||
@@ -53,6 +63,9 @@ export const SETTINGS_SECTION_SLUGS = [
|
||||
"insights",
|
||||
"medications",
|
||||
"mood",
|
||||
"labs",
|
||||
"illness",
|
||||
"vorsorge",
|
||||
"thresholds",
|
||||
"ai",
|
||||
// v1.18.0 (S5) — `coach` gathers the Coach preference cards (disable
|
||||
|
||||
@@ -21,8 +21,10 @@ import {
|
||||
Bell,
|
||||
Blocks,
|
||||
Bot,
|
||||
CalendarCheck,
|
||||
Download,
|
||||
FileHeart,
|
||||
FlaskConical,
|
||||
Info,
|
||||
KeyRound,
|
||||
LayoutDashboard,
|
||||
@@ -34,6 +36,7 @@ import {
|
||||
SlidersHorizontal,
|
||||
Smile,
|
||||
Sparkles,
|
||||
Thermometer,
|
||||
User,
|
||||
type LucideIcon,
|
||||
} from "lucide-react";
|
||||
@@ -160,6 +163,34 @@ export const SETTINGS_SECTIONS: readonly SettingsSection[] = [
|
||||
icon: Smile,
|
||||
moduleGate: "mood",
|
||||
},
|
||||
// v1.18.7 — Labor: the labs customise surface (view, sort, biomarkers)
|
||||
// becomes a first-class Settings section, gated on the `labs` module. Was
|
||||
// a standalone `ModuleSettingsFrame` page reached from the /labs wrench.
|
||||
{
|
||||
slug: "labs",
|
||||
titleKey: "settings.sections.labs.title",
|
||||
icon: FlaskConical,
|
||||
moduleGate: "labs",
|
||||
},
|
||||
// v1.18.7 — Krankheitstagebuch: the illness-journal customise surface
|
||||
// (view + order of episodes), gated on the `illness` module. Was a
|
||||
// standalone `ModuleSettingsFrame` page reached from the /illness wrench.
|
||||
{
|
||||
slug: "illness",
|
||||
titleKey: "settings.sections.illness.title",
|
||||
icon: Thermometer,
|
||||
moduleGate: "illness",
|
||||
},
|
||||
// v1.18.7 — Vorsorge: the preventive-care reminders customise surface
|
||||
// (view, order, individual reminders). NOT module-gated — preventive-care
|
||||
// reminders are not a toggleable module — so the entry is always shown.
|
||||
// Was a standalone `ModuleSettingsFrame` page reached from the /vorsorge
|
||||
// wrench.
|
||||
{
|
||||
slug: "vorsorge",
|
||||
titleKey: "settings.sections.vorsorge.title",
|
||||
icon: CalendarCheck,
|
||||
},
|
||||
{
|
||||
slug: "thresholds",
|
||||
titleKey: "settings.sections.thresholds.title",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
"use client";
|
||||
|
||||
/**
|
||||
* v1.18.7 — Settings → Vorsorge.
|
||||
*
|
||||
* The preventive-care reminders customise surface (list view, order,
|
||||
* individual reminders) was a standalone `ModuleSettingsFrame` page at
|
||||
* `/settings/vorsorge`; it now renders as a first-class Settings section.
|
||||
* The shell supplies the page chrome (left nav, heading, subtitle) so this
|
||||
* body is the preventive-care cards only. Preventive-care reminders are not
|
||||
* a toggleable module, so this entry carries no `moduleGate` (always shown).
|
||||
*/
|
||||
|
||||
import { VorsorgeSettings } from "@/components/measurement-reminders/vorsorge-settings";
|
||||
|
||||
export function VorsorgeSection() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<VorsorgeSettings />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user