mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-02 21:34:53 +03:00
update nav tree
This commit is contained in:
parent
09ceff9bd8
commit
88578284a5
@ -16,21 +16,71 @@
|
|||||||
"maintenance": "Maintenance - Frigate"
|
"maintenance": "Maintenance - Frigate"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"ui": "UI",
|
"general": "General",
|
||||||
"globalConfig": "Global Config",
|
"globalConfig": "Global Config",
|
||||||
"mqtt": "MQTT",
|
"system": "System",
|
||||||
"cameraConfig": "Camera Config",
|
"integrations": "Integrations",
|
||||||
|
"cameras": "Camera Configuration",
|
||||||
|
"ui": "UI",
|
||||||
|
"profileSettings": "Profile Settings",
|
||||||
|
"globalDetect": "Object Detection",
|
||||||
|
"globalRecording": "Recording",
|
||||||
|
"globalSnapshots": "Snapshots",
|
||||||
|
"globalMotion": "Motion detection",
|
||||||
|
"globalObjects": "Objects",
|
||||||
|
"globalReview": "Review",
|
||||||
|
"globalAudioEvents": "Audio events",
|
||||||
|
"globalLivePlayback": "Live playback",
|
||||||
|
"globalTimestampStyle": "Timestamp style",
|
||||||
|
"systemDatabase": "Database",
|
||||||
|
"systemTls": "TLS",
|
||||||
|
"systemAuthentication": "Authentication",
|
||||||
|
"systemNetworking": "Networking",
|
||||||
|
"systemProxy": "Proxy",
|
||||||
|
"systemUi": "UI",
|
||||||
|
"systemLogging": "Logging",
|
||||||
|
"systemEnvironmentVariables": "Environment variables",
|
||||||
|
"systemTelemetry": "Telemetry",
|
||||||
|
"systemBirdseye": "Birdseye",
|
||||||
|
"systemFfmpeg": "FFmpeg",
|
||||||
|
"systemDetectorHardware": "Detector hardware",
|
||||||
|
"systemDetectionModel": "Detection model",
|
||||||
|
"systemMqtt": "MQTT",
|
||||||
|
"integrationSemanticSearch": "Semantic Search",
|
||||||
|
"integrationGenerativeAi": "Generative AI",
|
||||||
|
"integrationFaceRecognition": "Face recognition",
|
||||||
|
"integrationLpr": "License Plate Recognition",
|
||||||
|
"integrationObjectClassification": "Object classification",
|
||||||
|
"integrationAudioTranscription": "Audio transcription",
|
||||||
|
"cameraDetect": "Object Detection",
|
||||||
|
"cameraFfmpeg": "FFmpeg",
|
||||||
|
"cameraRecording": "Recording",
|
||||||
|
"cameraSnapshots": "Snapshots",
|
||||||
|
"cameraMotion": "Motion detection",
|
||||||
|
"cameraObjects": "Objects",
|
||||||
|
"cameraConfigReview": "Review",
|
||||||
|
"cameraAudioEvents": "Audio events",
|
||||||
|
"cameraAudioTranscription": "Audio transcription",
|
||||||
|
"cameraNotifications": "Notifications",
|
||||||
|
"cameraLivePlayback": "Live playback",
|
||||||
|
"cameraBirdseye": "Birdseye",
|
||||||
|
"cameraFaceRecognition": "Face recognition",
|
||||||
|
"cameraLpr": "License Plate Recognition",
|
||||||
|
"cameraMqttConfig": "MQTT",
|
||||||
|
"cameraOnvif": "ONVIF",
|
||||||
|
"cameraUi": "Camera UI",
|
||||||
|
"cameraTimestampStyle": "Timestamp style",
|
||||||
"cameraMqtt": "Camera MQTT",
|
"cameraMqtt": "Camera MQTT",
|
||||||
"enrichments": "Enrichments",
|
|
||||||
"cameraManagement": "Management",
|
"cameraManagement": "Management",
|
||||||
"cameraReview": "Review",
|
"cameraReview": "Review",
|
||||||
"masksAndZones": "Masks / Zones",
|
"masksAndZones": "Masks / Zones",
|
||||||
"motionTuner": "Motion Tuner",
|
"motionTuner": "Motion Tuner",
|
||||||
"triggers": "Triggers",
|
"enrichments": "Enrichments",
|
||||||
"debug": "Debug",
|
|
||||||
"users": "Users",
|
"users": "Users",
|
||||||
"roles": "Roles",
|
"roles": "Roles",
|
||||||
"notifications": "Notifications",
|
"notifications": "Notifications",
|
||||||
|
"triggers": "Triggers",
|
||||||
|
"debug": "Debug",
|
||||||
"frigateplus": "Frigate+",
|
"frigateplus": "Frigate+",
|
||||||
"maintenance": "Maintenance"
|
"maintenance": "Maintenance"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -33,12 +33,9 @@ import MasksAndZonesView from "@/views/settings/MasksAndZonesView";
|
|||||||
import UsersView from "@/views/settings/UsersView";
|
import UsersView from "@/views/settings/UsersView";
|
||||||
import RolesView from "@/views/settings/RolesView";
|
import RolesView from "@/views/settings/RolesView";
|
||||||
import NotificationView from "@/views/settings/NotificationsSettingsView";
|
import NotificationView from "@/views/settings/NotificationsSettingsView";
|
||||||
import EnrichmentsSettingsView from "@/views/settings/EnrichmentsSettingsView";
|
|
||||||
import UiSettingsView from "@/views/settings/UiSettingsView";
|
import UiSettingsView from "@/views/settings/UiSettingsView";
|
||||||
import FrigatePlusSettingsView from "@/views/settings/FrigatePlusSettingsView";
|
import FrigatePlusSettingsView from "@/views/settings/FrigatePlusSettingsView";
|
||||||
import MaintenanceSettingsView from "@/views/settings/MaintenanceSettingsView";
|
import MaintenanceSettingsView from "@/views/settings/MaintenanceSettingsView";
|
||||||
import GlobalConfigView from "@/views/settings/GlobalConfigView";
|
|
||||||
import CameraConfigView from "@/views/settings/CameraConfigView";
|
|
||||||
import {
|
import {
|
||||||
SingleSectionPage,
|
SingleSectionPage,
|
||||||
type SettingsPageProps,
|
type SettingsPageProps,
|
||||||
@ -76,16 +73,59 @@ import {
|
|||||||
} from "@/components/mobile/MobilePage";
|
} from "@/components/mobile/MobilePage";
|
||||||
|
|
||||||
const allSettingsViews = [
|
const allSettingsViews = [
|
||||||
"ui",
|
"profileSettings",
|
||||||
"globalConfig",
|
"globalDetect",
|
||||||
"mqtt",
|
"globalRecording",
|
||||||
"cameraConfig",
|
"globalSnapshots",
|
||||||
"cameraMqtt",
|
"globalMotion",
|
||||||
"enrichments",
|
"globalObjects",
|
||||||
|
"globalReview",
|
||||||
|
"globalAudioEvents",
|
||||||
|
"globalLivePlayback",
|
||||||
|
"globalTimestampStyle",
|
||||||
|
"systemDatabase",
|
||||||
|
"systemTls",
|
||||||
|
"systemAuthentication",
|
||||||
|
"systemNetworking",
|
||||||
|
"systemProxy",
|
||||||
|
"systemUi",
|
||||||
|
"systemLogging",
|
||||||
|
"systemEnvironmentVariables",
|
||||||
|
"systemTelemetry",
|
||||||
|
"systemBirdseye",
|
||||||
|
"systemFfmpeg",
|
||||||
|
"systemDetectorHardware",
|
||||||
|
"systemDetectionModel",
|
||||||
|
"systemMqtt",
|
||||||
|
"integrationSemanticSearch",
|
||||||
|
"integrationGenerativeAi",
|
||||||
|
"integrationFaceRecognition",
|
||||||
|
"integrationLpr",
|
||||||
|
"integrationObjectClassification",
|
||||||
|
"integrationAudioTranscription",
|
||||||
|
"cameraDetect",
|
||||||
|
"cameraFfmpeg",
|
||||||
|
"cameraRecording",
|
||||||
|
"cameraSnapshots",
|
||||||
|
"cameraMotion",
|
||||||
|
"cameraObjects",
|
||||||
|
"cameraConfigReview",
|
||||||
|
"cameraAudioEvents",
|
||||||
|
"cameraAudioTranscription",
|
||||||
|
"cameraNotifications",
|
||||||
|
"cameraLivePlayback",
|
||||||
|
"cameraBirdseye",
|
||||||
|
"cameraFaceRecognition",
|
||||||
|
"cameraLpr",
|
||||||
|
"cameraMqttConfig",
|
||||||
|
"cameraOnvif",
|
||||||
|
"cameraUi",
|
||||||
|
"cameraTimestampStyle",
|
||||||
"cameraManagement",
|
"cameraManagement",
|
||||||
"cameraReview",
|
"cameraReview",
|
||||||
"masksAndZones",
|
"masksAndZones",
|
||||||
"motionTuner",
|
"motionTuner",
|
||||||
|
"enrichments",
|
||||||
"triggers",
|
"triggers",
|
||||||
"debug",
|
"debug",
|
||||||
"users",
|
"users",
|
||||||
@ -96,33 +136,175 @@ const allSettingsViews = [
|
|||||||
] as const;
|
] as const;
|
||||||
type SettingsType = (typeof allSettingsViews)[number];
|
type SettingsType = (typeof allSettingsViews)[number];
|
||||||
|
|
||||||
const MqttSettingsPage = (props: SettingsPageProps) => (
|
const createSectionPage = (
|
||||||
<SingleSectionPage sectionKey="mqtt" level="global" {...props} />
|
sectionKey: string,
|
||||||
|
level: "global" | "camera",
|
||||||
|
options?: { showOverrideIndicator?: boolean },
|
||||||
|
) => {
|
||||||
|
return (props: SettingsPageProps) => (
|
||||||
|
<SingleSectionPage
|
||||||
|
sectionKey={sectionKey}
|
||||||
|
level={level}
|
||||||
|
showOverrideIndicator={options?.showOverrideIndicator}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const GlobalDetectSettingsPage = createSectionPage("detect", "global");
|
||||||
|
const GlobalRecordingSettingsPage = createSectionPage("record", "global");
|
||||||
|
const GlobalSnapshotsSettingsPage = createSectionPage("snapshots", "global");
|
||||||
|
const GlobalMotionSettingsPage = createSectionPage("motion", "global");
|
||||||
|
const GlobalObjectsSettingsPage = createSectionPage("objects", "global");
|
||||||
|
const GlobalReviewSettingsPage = createSectionPage("review", "global");
|
||||||
|
const GlobalAudioEventsSettingsPage = createSectionPage("audio", "global");
|
||||||
|
const GlobalLivePlaybackSettingsPage = createSectionPage("live", "global");
|
||||||
|
const GlobalTimestampStyleSettingsPage = createSectionPage(
|
||||||
|
"timestamp_style",
|
||||||
|
"global",
|
||||||
);
|
);
|
||||||
|
|
||||||
const CameraMqttSettingsPage = (props: SettingsPageProps) => (
|
const SystemDatabaseSettingsPage = createSectionPage("database", "global");
|
||||||
<SingleSectionPage
|
const SystemTlsSettingsPage = createSectionPage("tls", "global");
|
||||||
sectionKey="mqtt"
|
const SystemAuthenticationSettingsPage = createSectionPage("auth", "global");
|
||||||
level="camera"
|
const SystemNetworkingSettingsPage = createSectionPage("networking", "global");
|
||||||
showOverrideIndicator={false}
|
const SystemProxySettingsPage = createSectionPage("proxy", "global");
|
||||||
{...props}
|
const SystemUiSettingsPage = createSectionPage("ui", "global");
|
||||||
/>
|
const SystemLoggingSettingsPage = createSectionPage("logger", "global");
|
||||||
|
const SystemEnvironmentVariablesSettingsPage = createSectionPage(
|
||||||
|
"environment_vars",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const SystemTelemetrySettingsPage = createSectionPage("telemetry", "global");
|
||||||
|
const SystemBirdseyeSettingsPage = createSectionPage("birdseye", "global");
|
||||||
|
const SystemFfmpegSettingsPage = createSectionPage("ffmpeg", "global");
|
||||||
|
const SystemDetectorHardwareSettingsPage = createSectionPage(
|
||||||
|
"detectors",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const SystemDetectionModelSettingsPage = createSectionPage("model", "global");
|
||||||
|
|
||||||
|
const SystemMqttSettingsPage = createSectionPage("mqtt", "global");
|
||||||
|
const IntegrationSemanticSearchSettingsPage = createSectionPage(
|
||||||
|
"semantic_search",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const IntegrationGenerativeAiSettingsPage = createSectionPage(
|
||||||
|
"genai",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const IntegrationFaceRecognitionSettingsPage = createSectionPage(
|
||||||
|
"face_recognition",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const IntegrationLprSettingsPage = createSectionPage("lpr", "global");
|
||||||
|
const IntegrationObjectClassificationSettingsPage = createSectionPage(
|
||||||
|
"classification",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
const IntegrationAudioTranscriptionSettingsPage = createSectionPage(
|
||||||
|
"audio_transcription",
|
||||||
|
"global",
|
||||||
|
);
|
||||||
|
|
||||||
|
const CameraDetectSettingsPage = createSectionPage("detect", "camera");
|
||||||
|
const CameraFfmpegSettingsPage = createSectionPage("ffmpeg", "camera");
|
||||||
|
const CameraRecordingSettingsPage = createSectionPage("record", "camera");
|
||||||
|
const CameraSnapshotsSettingsPage = createSectionPage("snapshots", "camera");
|
||||||
|
const CameraMotionSettingsPage = createSectionPage("motion", "camera");
|
||||||
|
const CameraObjectsSettingsPage = createSectionPage("objects", "camera");
|
||||||
|
const CameraConfigReviewSettingsPage = createSectionPage("review", "camera");
|
||||||
|
const CameraAudioEventsSettingsPage = createSectionPage("audio", "camera");
|
||||||
|
const CameraAudioTranscriptionSettingsPage = createSectionPage(
|
||||||
|
"audio_transcription",
|
||||||
|
"camera",
|
||||||
|
);
|
||||||
|
const CameraNotificationsSettingsPage = createSectionPage(
|
||||||
|
"notifications",
|
||||||
|
"camera",
|
||||||
|
);
|
||||||
|
const CameraLivePlaybackSettingsPage = createSectionPage("live", "camera");
|
||||||
|
const CameraBirdseyeSettingsPage = createSectionPage("birdseye", "camera");
|
||||||
|
const CameraFaceRecognitionSettingsPage = createSectionPage(
|
||||||
|
"face_recognition",
|
||||||
|
"camera",
|
||||||
|
);
|
||||||
|
const CameraLprSettingsPage = createSectionPage("lpr", "camera");
|
||||||
|
const CameraMqttConfigSettingsPage = createSectionPage("mqtt", "camera", {
|
||||||
|
showOverrideIndicator: false,
|
||||||
|
});
|
||||||
|
const CameraOnvifSettingsPage = createSectionPage("onvif", "camera", {
|
||||||
|
showOverrideIndicator: false,
|
||||||
|
});
|
||||||
|
const CameraUiSettingsPage = createSectionPage("ui", "camera", {
|
||||||
|
showOverrideIndicator: false,
|
||||||
|
});
|
||||||
|
const CameraTimestampStyleSettingsPage = createSectionPage(
|
||||||
|
"timestamp_style",
|
||||||
|
"camera",
|
||||||
);
|
);
|
||||||
|
|
||||||
const settingsGroups = [
|
const settingsGroups = [
|
||||||
{
|
{
|
||||||
label: "general",
|
label: "general",
|
||||||
|
items: [{ key: "profileSettings", component: UiSettingsView }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "globalConfig",
|
||||||
items: [
|
items: [
|
||||||
{ key: "ui", component: UiSettingsView },
|
{ key: "globalDetect", component: GlobalDetectSettingsPage },
|
||||||
{ key: "globalConfig", component: GlobalConfigView },
|
{ key: "globalRecording", component: GlobalRecordingSettingsPage },
|
||||||
{ key: "mqtt", component: MqttSettingsPage },
|
{ key: "globalSnapshots", component: GlobalSnapshotsSettingsPage },
|
||||||
|
{ key: "globalMotion", component: GlobalMotionSettingsPage },
|
||||||
|
{ key: "globalObjects", component: GlobalObjectsSettingsPage },
|
||||||
|
{ key: "globalReview", component: GlobalReviewSettingsPage },
|
||||||
|
{ key: "globalAudioEvents", component: GlobalAudioEventsSettingsPage },
|
||||||
|
{
|
||||||
|
key: "globalLivePlayback",
|
||||||
|
component: GlobalLivePlaybackSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "globalTimestampStyle",
|
||||||
|
component: GlobalTimestampStyleSettingsPage,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "cameras",
|
label: "cameras",
|
||||||
items: [
|
items: [
|
||||||
{ key: "cameraConfig", component: CameraConfigView },
|
{ key: "cameraDetect", component: CameraDetectSettingsPage },
|
||||||
{ key: "cameraMqtt", component: CameraMqttSettingsPage },
|
{ key: "cameraFfmpeg", component: CameraFfmpegSettingsPage },
|
||||||
|
{ key: "cameraRecording", component: CameraRecordingSettingsPage },
|
||||||
|
{ key: "cameraSnapshots", component: CameraSnapshotsSettingsPage },
|
||||||
|
{ key: "cameraMotion", component: CameraMotionSettingsPage },
|
||||||
|
{ key: "cameraObjects", component: CameraObjectsSettingsPage },
|
||||||
|
{ key: "cameraConfigReview", component: CameraConfigReviewSettingsPage },
|
||||||
|
{ key: "cameraAudioEvents", component: CameraAudioEventsSettingsPage },
|
||||||
|
{
|
||||||
|
key: "cameraAudioTranscription",
|
||||||
|
component: CameraAudioTranscriptionSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "cameraNotifications",
|
||||||
|
component: CameraNotificationsSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "cameraLivePlayback",
|
||||||
|
component: CameraLivePlaybackSettingsPage,
|
||||||
|
},
|
||||||
|
{ key: "cameraBirdseye", component: CameraBirdseyeSettingsPage },
|
||||||
|
{
|
||||||
|
key: "cameraFaceRecognition",
|
||||||
|
component: CameraFaceRecognitionSettingsPage,
|
||||||
|
},
|
||||||
|
{ key: "cameraLpr", component: CameraLprSettingsPage },
|
||||||
|
{ key: "cameraMqttConfig", component: CameraMqttConfigSettingsPage },
|
||||||
|
{ key: "cameraOnvif", component: CameraOnvifSettingsPage },
|
||||||
|
{ key: "cameraUi", component: CameraUiSettingsPage },
|
||||||
|
{
|
||||||
|
key: "cameraTimestampStyle",
|
||||||
|
component: CameraTimestampStyleSettingsPage,
|
||||||
|
},
|
||||||
{ key: "cameraManagement", component: CameraManagementView },
|
{ key: "cameraManagement", component: CameraManagementView },
|
||||||
{ key: "cameraReview", component: CameraReviewSettingsView },
|
{ key: "cameraReview", component: CameraReviewSettingsView },
|
||||||
{ key: "masksAndZones", component: MasksAndZonesView },
|
{ key: "masksAndZones", component: MasksAndZonesView },
|
||||||
@ -131,7 +313,60 @@ const settingsGroups = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "enrichments",
|
label: "enrichments",
|
||||||
items: [{ key: "enrichments", component: EnrichmentsSettingsView }],
|
items: [
|
||||||
|
{
|
||||||
|
key: "integrationSemanticSearch",
|
||||||
|
component: IntegrationSemanticSearchSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "integrationGenerativeAi",
|
||||||
|
component: IntegrationGenerativeAiSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "integrationFaceRecognition",
|
||||||
|
component: IntegrationFaceRecognitionSettingsPage,
|
||||||
|
},
|
||||||
|
{ key: "integrationLpr", component: IntegrationLprSettingsPage },
|
||||||
|
{
|
||||||
|
key: "integrationObjectClassification",
|
||||||
|
component: IntegrationObjectClassificationSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "integrationAudioTranscription",
|
||||||
|
component: IntegrationAudioTranscriptionSettingsPage,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "system",
|
||||||
|
items: [
|
||||||
|
{ key: "systemDatabase", component: SystemDatabaseSettingsPage },
|
||||||
|
{ key: "systemMqtt", component: SystemMqttSettingsPage },
|
||||||
|
{ key: "systemTls", component: SystemTlsSettingsPage },
|
||||||
|
{
|
||||||
|
key: "systemAuthentication",
|
||||||
|
component: SystemAuthenticationSettingsPage,
|
||||||
|
},
|
||||||
|
{ key: "systemNetworking", component: SystemNetworkingSettingsPage },
|
||||||
|
{ key: "systemProxy", component: SystemProxySettingsPage },
|
||||||
|
{ key: "systemUi", component: SystemUiSettingsPage },
|
||||||
|
{ key: "systemLogging", component: SystemLoggingSettingsPage },
|
||||||
|
{
|
||||||
|
key: "systemEnvironmentVariables",
|
||||||
|
component: SystemEnvironmentVariablesSettingsPage,
|
||||||
|
},
|
||||||
|
{ key: "systemTelemetry", component: SystemTelemetrySettingsPage },
|
||||||
|
{ key: "systemBirdseye", component: SystemBirdseyeSettingsPage },
|
||||||
|
{ key: "systemFfmpeg", component: SystemFfmpegSettingsPage },
|
||||||
|
{
|
||||||
|
key: "systemDetectorHardware",
|
||||||
|
component: SystemDetectorHardwareSettingsPage,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "systemDetectionModel",
|
||||||
|
component: SystemDetectionModelSettingsPage,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "users",
|
label: "users",
|
||||||
@ -159,8 +394,24 @@ const settingsGroups = [
|
|||||||
|
|
||||||
const CAMERA_SELECT_BUTTON_PAGES = [
|
const CAMERA_SELECT_BUTTON_PAGES = [
|
||||||
"debug",
|
"debug",
|
||||||
"cameraConfig",
|
"cameraDetect",
|
||||||
"cameraMqtt",
|
"cameraFfmpeg",
|
||||||
|
"cameraRecording",
|
||||||
|
"cameraSnapshots",
|
||||||
|
"cameraMotion",
|
||||||
|
"cameraObjects",
|
||||||
|
"cameraConfigReview",
|
||||||
|
"cameraAudioEvents",
|
||||||
|
"cameraAudioTranscription",
|
||||||
|
"cameraNotifications",
|
||||||
|
"cameraLivePlayback",
|
||||||
|
"cameraBirdseye",
|
||||||
|
"cameraFaceRecognition",
|
||||||
|
"cameraLpr",
|
||||||
|
"cameraMqttConfig",
|
||||||
|
"cameraOnvif",
|
||||||
|
"cameraUi",
|
||||||
|
"cameraTimestampStyle",
|
||||||
"cameraReview",
|
"cameraReview",
|
||||||
"masksAndZones",
|
"masksAndZones",
|
||||||
"motionTuner",
|
"motionTuner",
|
||||||
@ -212,7 +463,7 @@ function MobileMenuItem({
|
|||||||
|
|
||||||
export default function Settings() {
|
export default function Settings() {
|
||||||
const { t } = useTranslation(["views/settings"]);
|
const { t } = useTranslation(["views/settings"]);
|
||||||
const [page, setPage] = useState<SettingsType>("ui");
|
const [page, setPage] = useState<SettingsType>("profileSettings");
|
||||||
const [pageToggle, setPageToggle] = useOptimisticState(page, setPage, 100);
|
const [pageToggle, setPageToggle] = useOptimisticState(page, setPage, 100);
|
||||||
const [contentMobileOpen, setContentMobileOpen] = useState(false);
|
const [contentMobileOpen, setContentMobileOpen] = useState(false);
|
||||||
|
|
||||||
@ -308,7 +559,7 @@ export default function Settings() {
|
|||||||
!isAdmin &&
|
!isAdmin &&
|
||||||
!ALLOWED_VIEWS_FOR_VIEWER.includes(page as SettingsType)
|
!ALLOWED_VIEWS_FOR_VIEWER.includes(page as SettingsType)
|
||||||
) {
|
) {
|
||||||
setPageToggle("ui");
|
setPageToggle("profileSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(page as SettingsType);
|
setPageToggle(page as SettingsType);
|
||||||
}
|
}
|
||||||
@ -381,7 +632,7 @@ export default function Settings() {
|
|||||||
key as SettingsType,
|
key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("ui");
|
setPageToggle("profileSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(key as SettingsType);
|
setPageToggle(key as SettingsType);
|
||||||
}
|
}
|
||||||
@ -520,7 +771,7 @@ export default function Settings() {
|
|||||||
filteredItems[0].key as SettingsType,
|
filteredItems[0].key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("ui");
|
setPageToggle("profileSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(
|
setPageToggle(
|
||||||
filteredItems[0].key as SettingsType,
|
filteredItems[0].key as SettingsType,
|
||||||
@ -562,7 +813,7 @@ export default function Settings() {
|
|||||||
item.key as SettingsType,
|
item.key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("ui");
|
setPageToggle("profileSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(item.key as SettingsType);
|
setPageToggle(item.key as SettingsType);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user