2026-02-27 09:55:36 -06:00
|
|
|
import type { SectionConfigOverrides } from "./types";
|
|
|
|
|
|
|
|
|
|
const notifications: SectionConfigOverrides = {
|
|
|
|
|
base: {
|
|
|
|
|
sectionDocs: "/configuration/notifications",
|
|
|
|
|
restartRequired: [],
|
|
|
|
|
fieldOrder: ["enabled", "email"],
|
|
|
|
|
fieldGroups: {},
|
|
|
|
|
hiddenFields: ["enabled_in_config"],
|
|
|
|
|
advancedFields: [],
|
2026-09-13 12:53:44 -05:00
|
|
|
fieldMessages: [
|
|
|
|
|
{
|
|
|
|
|
key: "profile-base-notifications-disabled",
|
|
|
|
|
field: "enabled",
|
|
|
|
|
messageKey: "configMessages.notifications.profileBaseDisabled",
|
|
|
|
|
severity: "warning",
|
|
|
|
|
position: "after",
|
|
|
|
|
condition: (ctx) =>
|
|
|
|
|
!!ctx.profileName &&
|
|
|
|
|
ctx.formData?.enabled === true &&
|
|
|
|
|
!Object.values(ctx.fullConfig.cameras).some(
|
|
|
|
|
(camera) =>
|
|
|
|
|
camera.enabled_in_config &&
|
|
|
|
|
camera.notifications.enabled_in_config,
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
],
|
2026-02-27 09:55:36 -06:00
|
|
|
},
|
|
|
|
|
global: {
|
|
|
|
|
uiSchema: {
|
|
|
|
|
"ui:before": { render: "NotificationsSettingsExtras" },
|
|
|
|
|
enabled: { "ui:widget": "hidden" },
|
|
|
|
|
email: { "ui:widget": "hidden" },
|
|
|
|
|
cooldown: { "ui:widget": "hidden" },
|
|
|
|
|
enabled_in_config: { "ui:widget": "hidden" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
camera: {
|
|
|
|
|
hiddenFields: ["enabled_in_config", "email"],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default notifications;
|