mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
refactor(settings): fold Sources into Integrationen as a sub-tab
Source priority decides which connection wins when two report the same metric, so it belongs with the integrations rather than as a standalone settings page. Sources renders as the third Integrations sub-tab (Connections / Channels / Sources); the standalone `sources` slug is removed from the shell nav, slug registry, and route dispatch, and `/settings/sources` 301-redirects to `/settings/integrations`.
This commit is contained in:
1 parent
d3d8731209
commit
7b80a38ea2
8 files changed
+92
-66
No files matched your search
@@ -17,12 +17,10 @@ import { MoodSection } from "@/components/settings/mood-section";
|
||||
import { NotificationsSection } from "@/components/settings/notifications-section";
|
||||
import { RemindersSection } from "@/components/settings/reminders-section";
|
||||
import { SectionPlaceholder } from "@/components/settings/section-placeholder";
|
||||
// v1.8.7.1 — `thresholds` (Targets) and `sources` (Sources) are two
|
||||
// separate sections again. `ThresholdsSection` renders the target-range
|
||||
// editor; `SourcesSection` (standalone mode) renders the source-priority
|
||||
// ladders. Both are served by this dynamic route.
|
||||
// v1.18.0 (S3) — `sources` no longer has a standalone route; source priority
|
||||
// renders inside Settings → Integrations as the "Sources" sub-tab.
|
||||
// `/settings/sources` 301-redirects to `/settings/integrations` (next.config.ts).
|
||||
import { ThresholdsSection } from "@/components/settings/thresholds-section";
|
||||
import { SourcesSection } from "@/components/settings/sources-section";
|
||||
import {
|
||||
SETTINGS_SECTION_SLUGS,
|
||||
isSettingsSectionSlug,
|
||||
@@ -32,7 +30,7 @@ import { SettingsShell } from "@/components/settings/settings-shell";
|
||||
|
||||
/**
|
||||
* Dynamic settings section route. Each of the `SETTINGS_SECTION_SLUGS`
|
||||
* (16 today — 12 nav-visible sections plus the four routable-but-hidden
|
||||
* (15 today — 11 nav-visible sections plus the four routable-but-hidden
|
||||
* Layout child editors) is pre-rendered at build via
|
||||
* `generateStaticParams()` so the URLs are
|
||||
* statically known to Next.js, while the `dynamicParams = false` flag below
|
||||
@@ -64,7 +62,6 @@ const SECTION_COMPONENTS: Record<
|
||||
medications: MedicationsSection,
|
||||
mood: MoodSection,
|
||||
thresholds: ThresholdsSection,
|
||||
sources: () => <SourcesSection />,
|
||||
api: ApiSection,
|
||||
export: ExportSection,
|
||||
advanced: AdvancedSection,
|
||||
|
||||
Reference in new issue
Block a user