- Changed the fitness overview path from `/activity` to `/history` and updated related navigation labels to reflect this change. - Refactored the `FitnessDashboardOverview` component to accept external period control and conditionally display the period selector. - Integrated the `FitnessDashboardOverview` into the `History` page, enhancing the user experience with consistent terminology and layout. - Removed the fitness overview from the `ActivityPage` to streamline the interface and focus on activity data collection.
118 lines
2.6 KiB
JavaScript
118 lines
2.6 KiB
JavaScript
/**
|
|
* Erfassungs-Routen: Kachel-Hub + Sub-Navigation (Chip / Seitenleiste).
|
|
* Pfade müssen mit den Routes in App.jsx unter CaptureShell übereinstimmen.
|
|
*/
|
|
|
|
export const CAPTURE_HUB_TILES = [
|
|
{
|
|
icon: '⚖️',
|
|
label: 'Gewicht',
|
|
sub: 'Tägliche Gewichtseingabe',
|
|
to: '/weight',
|
|
color: '#378ADD',
|
|
},
|
|
{
|
|
icon: '🪄',
|
|
label: 'Assistent',
|
|
sub: 'Schritt-für-Schritt Messung (Umfänge & Caliper)',
|
|
to: '/wizard',
|
|
color: '#7F77DD',
|
|
highlight: true,
|
|
},
|
|
{
|
|
icon: '📏',
|
|
label: 'Umfänge',
|
|
sub: 'Hals, Brust, Taille, Bauch, Hüfte, Oberschenkel, Wade, Arm',
|
|
to: '/circum',
|
|
color: '#1D9E75',
|
|
},
|
|
{
|
|
icon: '📷',
|
|
label: 'Fotos',
|
|
sub: 'Fortschrittsfotos hochladen und verwalten',
|
|
to: '/photos',
|
|
color: '#5C6BC0',
|
|
},
|
|
{
|
|
icon: '📐',
|
|
label: 'Caliper',
|
|
sub: 'Körperfett per Hautfaltenmessung',
|
|
to: '/caliper',
|
|
color: '#D85A30',
|
|
},
|
|
{
|
|
icon: '🍽️',
|
|
label: 'Ernährung',
|
|
sub: 'FDDB CSV importieren',
|
|
to: '/nutrition',
|
|
color: '#EF9F27',
|
|
},
|
|
{
|
|
icon: '📥',
|
|
label: 'CSV-Import',
|
|
sub: 'Vorlagen für Ernährung, Gewicht, Blutdruck',
|
|
to: '/csv-import',
|
|
color: '#2E7D32',
|
|
},
|
|
{
|
|
icon: '🏋️',
|
|
label: 'Aktivität',
|
|
sub: 'Training manuell oder Apple Health importieren',
|
|
to: '/activity',
|
|
color: '#D4537E',
|
|
},
|
|
{
|
|
icon: '🌙',
|
|
label: 'Schlaf',
|
|
sub: 'Schlafdaten erfassen oder Apple Health importieren',
|
|
to: '/sleep',
|
|
color: '#7B68EE',
|
|
},
|
|
{
|
|
icon: '🛌',
|
|
label: 'Ruhetage',
|
|
sub: 'Kraft-, Cardio-, oder Entspannungs-Ruhetag erfassen',
|
|
to: '/rest-days',
|
|
color: '#9B59B6',
|
|
},
|
|
{
|
|
icon: '❤️',
|
|
label: 'Vitalwerte',
|
|
sub: 'Ruhepuls und HRV morgens erfassen',
|
|
to: '/vitals',
|
|
color: '#E74C3C',
|
|
},
|
|
{
|
|
icon: '🎯',
|
|
label: 'Eigene Ziele',
|
|
sub: 'Fortschritte für individuelle Ziele erfassen',
|
|
to: '/custom-goals',
|
|
color: '#1D9E75',
|
|
},
|
|
{
|
|
icon: '📖',
|
|
label: 'Messanleitung',
|
|
sub: 'Wie und wo genau messen?',
|
|
to: '/guide',
|
|
color: '#888780',
|
|
},
|
|
]
|
|
|
|
/** Erster Eintrag: zurück zur Kachel-Übersicht */
|
|
const OVERVIEW_ENTRY = {
|
|
icon: '📋',
|
|
label: 'Übersicht',
|
|
sub: 'Alle Erfassungsarten',
|
|
to: '/capture',
|
|
color: 'var(--accent)',
|
|
}
|
|
|
|
/** Reihenfolge für Chip- / Seitenleiste (inkl. Übersicht) */
|
|
export const CAPTURE_SHELL_NAV_ITEMS = [OVERVIEW_ENTRY, ...CAPTURE_HUB_TILES]
|
|
|
|
export const CAPTURE_SECTION_PATHS = CAPTURE_SHELL_NAV_ITEMS.map((e) => e.to)
|
|
|
|
export function isCaptureSectionPath(pathname) {
|
|
return CAPTURE_SECTION_PATHS.includes(pathname)
|
|
}
|