Settings UI improvements (#23109)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions

* use badge with popover to show which cameras override each global config section

* don't use shorthand

* use label i18n
This commit is contained in:
Josh Hawkins
2026-05-04 09:50:00 -06:00
committed by GitHub
parent ef9d7e07b7
commit f448b259a2
5 changed files with 622 additions and 42 deletions
@@ -2,6 +2,7 @@ import { useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import type { SectionConfig } from "@/components/config-form/sections";
import { ConfigSectionTemplate } from "@/components/config-form/sections";
import { CameraOverridesBadge } from "@/components/config-form/sections/CameraOverridesBadge";
import type { PolygonType } from "@/types/canvas";
import { Badge } from "@/components/ui/badge";
import {
@@ -167,6 +168,9 @@ export function SingleSectionPage({
</div>
{/* Desktop: badge inline next to title */}
<div className="hidden shrink-0 sm:flex sm:flex-wrap sm:items-center sm:gap-2">
{level === "global" && showOverrideIndicator && (
<CameraOverridesBadge sectionPath={sectionKey} />
)}
{level === "camera" &&
showOverrideIndicator &&
sectionStatus.isOverridden && (
@@ -224,6 +228,9 @@ export function SingleSectionPage({
</div>
{/* Mobile: badge below title/description */}
<div className="flex flex-wrap items-center gap-2 sm:hidden">
{level === "global" && showOverrideIndicator && (
<CameraOverridesBadge sectionPath={sectionKey} />
)}
{level === "camera" &&
showOverrideIndicator &&
sectionStatus.isOverridden && (