mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 05:38:25 +03:00
rename profile settings to ui settings
This commit is contained in:
parent
6dd8aa912e
commit
33e4dddb3e
@ -8,7 +8,7 @@
|
|||||||
"masksAndZones": "Mask and Zone Editor - Frigate",
|
"masksAndZones": "Mask and Zone Editor - Frigate",
|
||||||
"motionTuner": "Motion Tuner - Frigate",
|
"motionTuner": "Motion Tuner - Frigate",
|
||||||
"object": "Debug - Frigate",
|
"object": "Debug - Frigate",
|
||||||
"general": "Profile Settings - Frigate",
|
"general": "UI Settings - Frigate",
|
||||||
"globalConfig": "Global Configuration - Frigate",
|
"globalConfig": "Global Configuration - Frigate",
|
||||||
"cameraConfig": "Camera Configuration - Frigate",
|
"cameraConfig": "Camera Configuration - Frigate",
|
||||||
"frigatePlus": "Frigate+ Settings - Frigate",
|
"frigatePlus": "Frigate+ Settings - Frigate",
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"integrations": "Integrations",
|
"integrations": "Integrations",
|
||||||
"cameras": "Camera configuration",
|
"cameras": "Camera configuration",
|
||||||
"ui": "UI",
|
"ui": "UI",
|
||||||
"profileSettings": "Profile settings",
|
"uiSettings": "UI settings",
|
||||||
"profiles": "Profiles",
|
"profiles": "Profiles",
|
||||||
"globalDetect": "Object detection",
|
"globalDetect": "Object detection",
|
||||||
"globalRecording": "Recording",
|
"globalRecording": "Recording",
|
||||||
@ -119,7 +119,7 @@
|
|||||||
"noCamera": "No Camera"
|
"noCamera": "No Camera"
|
||||||
},
|
},
|
||||||
"general": {
|
"general": {
|
||||||
"title": "Profile Settings",
|
"title": "UI Settings",
|
||||||
"liveDashboard": {
|
"liveDashboard": {
|
||||||
"title": "Live Dashboard",
|
"title": "Live Dashboard",
|
||||||
"automaticLiveView": {
|
"automaticLiveView": {
|
||||||
|
|||||||
@ -104,7 +104,7 @@ import SaveAllPreviewPopover, {
|
|||||||
import { useRestart } from "@/api/ws";
|
import { useRestart } from "@/api/ws";
|
||||||
|
|
||||||
const allSettingsViews = [
|
const allSettingsViews = [
|
||||||
"profileSettings",
|
"uiSettings",
|
||||||
"profiles",
|
"profiles",
|
||||||
"globalDetect",
|
"globalDetect",
|
||||||
"globalRecording",
|
"globalRecording",
|
||||||
@ -317,7 +317,7 @@ const settingsGroups = [
|
|||||||
{
|
{
|
||||||
label: "general",
|
label: "general",
|
||||||
items: [
|
items: [
|
||||||
{ key: "profileSettings", component: UiSettingsView },
|
{ key: "uiSettings", component: UiSettingsView },
|
||||||
{ key: "profiles", component: ProfilesView },
|
{ key: "profiles", component: ProfilesView },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -490,7 +490,7 @@ const CAMERA_SELECT_BUTTON_PAGES = [
|
|||||||
"regionGrid",
|
"regionGrid",
|
||||||
];
|
];
|
||||||
|
|
||||||
const ALLOWED_VIEWS_FOR_VIEWER = ["profileSettings", "notifications"];
|
const ALLOWED_VIEWS_FOR_VIEWER = ["uiSettings", "notifications"];
|
||||||
|
|
||||||
// keys for camera sections
|
// keys for camera sections
|
||||||
const CAMERA_SECTION_MAPPING: Record<string, SettingsType> = {
|
const CAMERA_SECTION_MAPPING: Record<string, SettingsType> = {
|
||||||
@ -627,7 +627,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>("profileSettings");
|
const [page, setPage] = useState<SettingsType>("uiSettings");
|
||||||
const [pageToggle, setPageToggle] = useOptimisticState(page, setPage, 100);
|
const [pageToggle, setPageToggle] = useOptimisticState(page, setPage, 100);
|
||||||
const [contentMobileOpen, setContentMobileOpen] = useState(false);
|
const [contentMobileOpen, setContentMobileOpen] = useState(false);
|
||||||
const [sectionStatusByKey, setSectionStatusByKey] = useState<
|
const [sectionStatusByKey, setSectionStatusByKey] = useState<
|
||||||
@ -1018,7 +1018,7 @@ export default function Settings() {
|
|||||||
!isAdmin &&
|
!isAdmin &&
|
||||||
!ALLOWED_VIEWS_FOR_VIEWER.includes(page as SettingsType)
|
!ALLOWED_VIEWS_FOR_VIEWER.includes(page as SettingsType)
|
||||||
) {
|
) {
|
||||||
setPageToggle("profileSettings");
|
setPageToggle("uiSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(page as SettingsType);
|
setPageToggle(page as SettingsType);
|
||||||
}
|
}
|
||||||
@ -1456,7 +1456,7 @@ export default function Settings() {
|
|||||||
key as SettingsType,
|
key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("profileSettings");
|
setPageToggle("uiSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(key as SettingsType);
|
setPageToggle(key as SettingsType);
|
||||||
}
|
}
|
||||||
@ -1756,7 +1756,7 @@ export default function Settings() {
|
|||||||
filteredItems[0].key as SettingsType,
|
filteredItems[0].key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("profileSettings");
|
setPageToggle("uiSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(
|
setPageToggle(
|
||||||
filteredItems[0].key as SettingsType,
|
filteredItems[0].key as SettingsType,
|
||||||
@ -1796,7 +1796,7 @@ export default function Settings() {
|
|||||||
item.key as SettingsType,
|
item.key as SettingsType,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPageToggle("profileSettings");
|
setPageToggle("uiSettings");
|
||||||
} else {
|
} else {
|
||||||
setPageToggle(item.key as SettingsType);
|
setPageToggle(item.key as SettingsType);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,10 +212,10 @@ export default function UiSettingsView() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex size-full flex-col">
|
<div className="flex size-full flex-col">
|
||||||
<Toaster position="top-center" closeButton={true} />
|
<Toaster position="top-center" closeButton={true} />
|
||||||
<Heading as="h4" className="mb-3">
|
|
||||||
{t("general.title")}
|
|
||||||
</Heading>
|
|
||||||
<div className="scrollbar-container mb-2 mt-2 flex h-full w-full flex-col overflow-y-auto pb-2">
|
<div className="scrollbar-container mb-2 mt-2 flex h-full w-full flex-col overflow-y-auto pb-2">
|
||||||
|
<Heading as="h4" className="mb-3">
|
||||||
|
{t("general.title")}
|
||||||
|
</Heading>
|
||||||
<div className="w-full max-w-5xl space-y-6">
|
<div className="w-full max-w-5xl space-y-6">
|
||||||
<SettingsGroupCard title={t("general.liveDashboard.title")}>
|
<SettingsGroupCard title={t("general.liveDashboard.title")}>
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user