mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(notifications): Add Gotify (#1180)
feat(notifications): Add Gotify (resolves #513)
This commit is contained in:
parent
525861074b
commit
77948d7654
8 changed files with 233 additions and 6 deletions
|
@ -182,11 +182,36 @@ function FormFieldsPushover() {
|
|||
);
|
||||
}
|
||||
|
||||
function FormFieldsGotify() {
|
||||
return (
|
||||
<div className="border-t border-gray-200 dark:border-gray-700 py-4">
|
||||
<div className="px-4 space-y-1">
|
||||
<Dialog.Title className="text-lg font-medium text-gray-900 dark:text-white">Settings</Dialog.Title>
|
||||
</div>
|
||||
|
||||
<TextFieldWide
|
||||
name="host"
|
||||
label="Gotify URL"
|
||||
help="Gotify URL"
|
||||
placeholder="https://some.gotify.server.com"
|
||||
required={true}
|
||||
/>
|
||||
<PasswordFieldWide
|
||||
name="token"
|
||||
label="Application Token"
|
||||
help="Application Token"
|
||||
required={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const componentMap: componentMapType = {
|
||||
DISCORD: <FormFieldsDiscord />,
|
||||
NOTIFIARR: <FormFieldsNotifiarr />,
|
||||
TELEGRAM: <FormFieldsTelegram />,
|
||||
PUSHOVER: <FormFieldsPushover />
|
||||
PUSHOVER: <FormFieldsPushover />,
|
||||
GOTIFY: <FormFieldsGotify />
|
||||
};
|
||||
|
||||
interface NotificationAddFormValues {
|
||||
|
@ -464,6 +489,7 @@ interface InitialValues {
|
|||
priority?: number;
|
||||
channel?: string;
|
||||
topic?: string;
|
||||
host?: string;
|
||||
events: NotificationEvent[];
|
||||
}
|
||||
|
||||
|
@ -513,6 +539,7 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
priority: notification.priority,
|
||||
channel: notification.channel,
|
||||
topic: notification.topic,
|
||||
host: notification.host,
|
||||
events: notification.events || []
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue