Miscellaneous fixes (#23111)
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

* return 404 from /api/login if auth is disabled

* locale sort object label switches

* enable search on object switches field

* add profiles docs link
This commit is contained in:
Josh Hawkins
2026-05-05 09:03:49 -06:00
committed by GitHub
parent f448b259a2
commit 52a3301726
3 changed files with 33 additions and 3 deletions
@@ -2,7 +2,7 @@
import { WidgetProps } from "@rjsf/utils";
import { SwitchesWidget } from "./SwitchesWidget";
import { FormContext } from "./SwitchesWidget";
import { getTranslatedLabel } from "@/utils/i18n";
import i18n, { getTranslatedLabel } from "@/utils/i18n";
import { FrigateConfig } from "@/types/frigateConfig";
import { JsonObject } from "@/types/configForm";
@@ -76,7 +76,12 @@ function getObjectLabels(context: FormContext): string[] {
...sourceLabels,
...formDataLabels,
]);
return [...combinedLabels].sort();
return [...combinedLabels].sort((a, b) =>
getObjectLabelDisplayName(a).localeCompare(
getObjectLabelDisplayName(b),
i18n.language,
),
);
}
function getObjectLabelDisplayName(label: string): string {
@@ -94,6 +99,7 @@ export function ObjectLabelSwitchesWidget(props: WidgetProps) {
i18nKey: "objectLabels",
listClassName:
"relative max-h-none overflow-visible md:max-h-64 md:overflow-y-auto md:overscroll-contain md:scrollbar-container",
enableSearch: true,
}}
/>
);