spacing and language tweaks

This commit is contained in:
Josh Hawkins 2026-02-04 11:51:54 -06:00
parent de5c26dd0b
commit 5841c827f7
5 changed files with 13 additions and 10 deletions

View File

@ -1245,14 +1245,14 @@
"title": "Object Settings" "title": "Object Settings"
}, },
"objectLabels": { "objectLabels": {
"summary": "Selected {{count}}", "summary": "{{count}} selected",
"empty": "No object labels available" "empty": "No object labels available"
}, },
"filters": { "filters": {
"objectFieldLabel": "{{field}} for {{label}}" "objectFieldLabel": "{{field}} for {{label}}"
}, },
"zoneNames": { "zoneNames": {
"summary": "Selected {{count}}", "summary": "{{count}} selected",
"empty": "No zones available" "empty": "No zones available"
}, },
"review": { "review": {

View File

@ -154,7 +154,7 @@ export default function CameraReviewClassification({
} }
return ( return (
<div className="space-y-6"> <div className="mb-4 space-y-6">
<Heading as="h4" className="my-2"> <Heading as="h4" className="my-2">
<Trans ns="views/settings"> <Trans ns="views/settings">
cameraReview.reviewClassification.title cameraReview.reviewClassification.title

View File

@ -167,7 +167,7 @@ export function ConfigSection({
onSave, onSave,
requiresRestart = true, requiresRestart = true,
collapsible = false, collapsible = false,
defaultCollapsed = false, defaultCollapsed = true,
showTitle, showTitle,
onStatusChange, onStatusChange,
pendingDataBySection, pendingDataBySection,

View File

@ -66,7 +66,7 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
// Check if this is a root-level object // Check if this is a root-level object
const isRoot = registry?.rootSchema === schema; const isRoot = registry?.rootSchema === schema;
const [isOpen, setIsOpen] = useState(true); const [isOpen, setIsOpen] = useState(false);
const isCameraLevel = formContext?.level === "camera"; const isCameraLevel = formContext?.level === "camera";
const effectiveNamespace = isCameraLevel ? "config/cameras" : "config/global"; const effectiveNamespace = isCameraLevel ? "config/cameras" : "config/global";
@ -276,7 +276,10 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
{advancedProps.length > 0 && ( {advancedProps.length > 0 && (
<Collapsible open={showAdvanced} onOpenChange={setShowAdvanced}> <Collapsible open={showAdvanced} onOpenChange={setShowAdvanced}>
<CollapsibleTrigger asChild> <CollapsibleTrigger asChild>
<Button variant="ghost" className="w-full justify-start gap-2"> <Button
variant="ghost"
className="w-full justify-start gap-2 pl-0"
>
{showAdvanced ? ( {showAdvanced ? (
<LuChevronDown className="h-4 w-4" /> <LuChevronDown className="h-4 w-4" />
) : ( ) : (
@ -328,7 +331,7 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
<Button <Button
variant="ghost" variant="ghost"
size="sm" size="sm"
className="w-full justify-start gap-2" className="w-full justify-start gap-2 pl-0"
> >
{showAdvanced ? ( {showAdvanced ? (
<LuChevronDown className="h-4 w-4" /> <LuChevronDown className="h-4 w-4" />

View File

@ -148,10 +148,10 @@ export function SwitchesWidget(props: WidgetProps) {
const summary = t const summary = t
? t(`configForm.${i18nKey}.summary`, { ? t(`configForm.${i18nKey}.summary`, {
ns: namespace, ns: namespace,
defaultValue: "Selected {{count}}", defaultValue: "{{count}} selected",
count: selectedEntities.length, count: selectedEntities.length,
}) })
: `Selected ${selectedEntities.length}`; : `${selectedEntities.length} selected`;
const emptyMessage = t const emptyMessage = t
? t(`configForm.${i18nKey}.empty`, { ? t(`configForm.${i18nKey}.empty`, {
@ -167,7 +167,7 @@ export function SwitchesWidget(props: WidgetProps) {
<Button <Button
type="button" type="button"
variant="ghost" variant="ghost"
className="w-full justify-start gap-2" className="w-full justify-start gap-2 pl-0"
disabled={disabled || readonly} disabled={disabled || readonly}
> >
{isOpen ? ( {isOpen ? (