implement profile friendly names and improve profile UI

- Add ProfileDefinitionConfig type and profiles field to FrigateConfig
- Use ProfilesApiResponse type with friendly_name support throughout
- Replace Record<string, unknown> with proper JsonObject/JsonValue types
- Add profile creation form matching zone pattern (Zod + NameAndIdFields)
- Add pencil icon for renaming profile friendly names in ProfilesView
- Move Profiles menu item to first under Camera Configuration
- Add activity indicators on save/rename/delete buttons
- Display friendly names in CameraManagementView profile selector
- Fix duplicate colored dots in management profile dropdown
- Fix i18n namespace for overridden base config tooltips
- Move profile override deletion from dropdown trash icon to footer
  button with confirmation dialog, matching Reset to Global pattern
- Remove Add Profile from section header dropdown to prevent saving
  camera overrides before top-level profile definition exists
- Clean up newProfiles state after API profile deletion
- Refresh profiles SWR cache after saving profile definitions
This commit is contained in:
Josh Hawkins
2026-03-11 20:55:56 -05:00
parent 0b3c6ed22e
commit 39500b20a0
11 changed files with 519 additions and 418 deletions
+3 -3
View File
@@ -374,7 +374,7 @@ export function requiresRestartForFieldPath(
export interface SectionSavePayload {
basePath: string;
sanitizedOverrides: Record<string, unknown>;
sanitizedOverrides: JsonObject;
updateTopic: string | undefined;
needsRestart: boolean;
pendingDataKey: string;
@@ -561,7 +561,7 @@ export function prepareSectionSavePayload(opts: {
if (
!sanitizedOverrides ||
typeof sanitizedOverrides !== "object" ||
Object.keys(sanitizedOverrides as Record<string, unknown>).length === 0
Object.keys(sanitizedOverrides as JsonObject).length === 0
) {
return null;
}
@@ -597,7 +597,7 @@ export function prepareSectionSavePayload(opts: {
return {
basePath,
sanitizedOverrides: sanitizedOverrides as Record<string, unknown>,
sanitizedOverrides: sanitizedOverrides as JsonObject,
updateTopic,
needsRestart,
pendingDataKey,