mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-07 14:05:28 +03:00
Merge 51224dfbcf into f448b259a2
This commit is contained in:
commit
283bb56c06
@ -812,6 +812,11 @@ limiter = Limiter(key_func=get_remote_addr)
|
|||||||
)
|
)
|
||||||
@limiter.limit(limit_value=rateLimiter.get_limit)
|
@limiter.limit(limit_value=rateLimiter.get_limit)
|
||||||
def login(request: Request, body: AppPostLoginBody):
|
def login(request: Request, body: AppPostLoginBody):
|
||||||
|
if not request.app.frigate_config.auth.enabled:
|
||||||
|
return JSONResponse(
|
||||||
|
content={"message": "Authentication is disabled"}, status_code=404
|
||||||
|
)
|
||||||
|
|
||||||
JWT_COOKIE_NAME = request.app.frigate_config.auth.cookie_name
|
JWT_COOKIE_NAME = request.app.frigate_config.auth.cookie_name
|
||||||
JWT_COOKIE_SECURE = request.app.frigate_config.auth.cookie_secure
|
JWT_COOKIE_SECURE = request.app.frigate_config.auth.cookie_secure
|
||||||
JWT_SESSION_LENGTH = request.app.frigate_config.auth.session_length
|
JWT_SESSION_LENGTH = request.app.frigate_config.auth.session_length
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
import { WidgetProps } from "@rjsf/utils";
|
import { WidgetProps } from "@rjsf/utils";
|
||||||
import { SwitchesWidget } from "./SwitchesWidget";
|
import { SwitchesWidget } from "./SwitchesWidget";
|
||||||
import { FormContext } from "./SwitchesWidget";
|
import { FormContext } from "./SwitchesWidget";
|
||||||
import { getTranslatedLabel } from "@/utils/i18n";
|
import i18n, { getTranslatedLabel } from "@/utils/i18n";
|
||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import { JsonObject } from "@/types/configForm";
|
import { JsonObject } from "@/types/configForm";
|
||||||
|
|
||||||
@ -76,7 +76,12 @@ function getObjectLabels(context: FormContext): string[] {
|
|||||||
...sourceLabels,
|
...sourceLabels,
|
||||||
...formDataLabels,
|
...formDataLabels,
|
||||||
]);
|
]);
|
||||||
return [...combinedLabels].sort();
|
return [...combinedLabels].sort((a, b) =>
|
||||||
|
getObjectLabelDisplayName(a).localeCompare(
|
||||||
|
getObjectLabelDisplayName(b),
|
||||||
|
i18n.language,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getObjectLabelDisplayName(label: string): string {
|
function getObjectLabelDisplayName(label: string): string {
|
||||||
@ -94,6 +99,7 @@ export function ObjectLabelSwitchesWidget(props: WidgetProps) {
|
|||||||
i18nKey: "objectLabels",
|
i18nKey: "objectLabels",
|
||||||
listClassName:
|
listClassName:
|
||||||
"relative max-h-none overflow-visible md:max-h-64 md:overflow-y-auto md:overscroll-contain md:scrollbar-container",
|
"relative max-h-none overflow-visible md:max-h-64 md:overflow-y-auto md:overscroll-contain md:scrollbar-container",
|
||||||
|
enableSearch: true,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user