fix: fix string wrong

This commit is contained in:
ZhaiSoul 2025-03-07 22:16:35 +08:00
parent d0d0756496
commit 3675748577
2 changed files with 4 additions and 5 deletions

View File

@ -99,9 +99,8 @@ export function GeneralFilterContent({
> >
<Trans> <Trans>
ui.settingView.masksAndZonesSettings. ui.settingView.masksAndZonesSettings.
{item.replace(/_([a-z])/g, (match, letter) => {item.replace(/_([a-z])/g, (letter) => letter.toUpperCase()) +
letter.toUpperCase(), "s"}
) + "s"}
</Trans> </Trans>
</Label> </Label>
<Switch <Switch

View File

@ -122,7 +122,7 @@ export default function Settings() {
setSelectedCamera(firstEnabledCamera.name); setSelectedCamera(firstEnabledCamera.name);
} else if ( } else if (
!cameraEnabledStates[selectedCamera] && !cameraEnabledStates[selectedCamera] &&
page !== "camera settings" page !== "cameraSettings"
) { ) {
// Switch to first enabled camera if current one is disabled, unless on "camera settings" page // Switch to first enabled camera if current one is disabled, unless on "camera settings" page
const firstEnabledCamera = const firstEnabledCamera =
@ -331,7 +331,7 @@ function CameraSelectButton({
<div className="flex flex-col gap-2.5"> <div className="flex flex-col gap-2.5">
{allCameras.map((item) => { {allCameras.map((item) => {
const isEnabled = cameraEnabledStates[item.name]; const isEnabled = cameraEnabledStates[item.name];
const isCameraSettingsPage = currentPage === "camera settings"; const isCameraSettingsPage = currentPage === "cameraSettings";
return ( return (
<FilterSwitch <FilterSwitch
key={item.name} key={item.name}