mirror of
https://github.com/sct/overseerr.git
synced 2025-12-31 01:55:53 +01:00
feat(notif): add "Media Automatically Approved" notification type (#1137)
This commit is contained in:
@@ -28,7 +28,6 @@ const messages = defineMessages({
|
||||
notificationsettingssaved: 'Notification settings saved successfully!',
|
||||
notificationsettingsfailed: 'Notification settings failed to save.',
|
||||
enablenotifications: 'Enable Notifications',
|
||||
autoapprovedrequests: 'Enable Notifications for Automatic Approvals',
|
||||
email: 'Email',
|
||||
webhook: 'Webhook',
|
||||
});
|
||||
@@ -187,14 +186,12 @@ const SettingsNotifications: React.FC = ({ children }) => {
|
||||
<Formik
|
||||
initialValues={{
|
||||
enabled: data.enabled,
|
||||
autoapprovalEnabled: data.autoapprovalEnabled,
|
||||
}}
|
||||
enableReinitialize
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await axios.post('/api/v1/settings/notifications', {
|
||||
enabled: values.enabled,
|
||||
autoapprovalEnabled: values.autoapprovalEnabled,
|
||||
});
|
||||
addToast(intl.formatMessage(messages.notificationsettingssaved), {
|
||||
appearance: 'success',
|
||||
@@ -233,26 +230,6 @@ const SettingsNotifications: React.FC = ({ children }) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label htmlFor="name" className="checkbox-label">
|
||||
<span>
|
||||
{intl.formatMessage(messages.autoapprovedrequests)}
|
||||
</span>
|
||||
</label>
|
||||
<div className="form-input">
|
||||
<Field
|
||||
type="checkbox"
|
||||
id="autoapprovalEnabled"
|
||||
name="autoapprovalEnabled"
|
||||
onChange={() => {
|
||||
setFieldValue(
|
||||
'autoapprovalEnabled',
|
||||
!values.autoapprovalEnabled
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="actions">
|
||||
<div className="flex justify-end">
|
||||
<span className="inline-flex ml-3 rounded-md shadow-sm">
|
||||
|
||||
Reference in New Issue
Block a user