mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-11 07:45:41 +03:00
ensure the selected page is visible when navigating via url on mobile
This commit is contained in:
parent
438f28aa97
commit
2fa28494a1
@ -273,6 +273,9 @@ export default function Settings() {
|
||||
} else {
|
||||
setPageToggle(page as SettingsType);
|
||||
}
|
||||
if (isMobile) {
|
||||
setContentMobileOpen(true);
|
||||
}
|
||||
}
|
||||
// don't clear url params if we're creating a new object mask
|
||||
return !(searchParams.has("object_mask") || searchParams.has("event_id"));
|
||||
@ -282,6 +285,9 @@ export default function Settings() {
|
||||
const cameraNames = cameras.map((c) => c.name);
|
||||
if (cameraNames.includes(camera)) {
|
||||
setSelectedCamera(camera);
|
||||
if (isMobile) {
|
||||
setContentMobileOpen(true);
|
||||
}
|
||||
}
|
||||
// don't clear url params if we're creating a new object mask or trigger
|
||||
return !(searchParams.has("object_mask") || searchParams.has("event_id"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user