mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
feat(notifications): optional Telegram sender (#1726)
refactor(notifications): optional Telegram sender
This commit is contained in:
parent
c8e2fba334
commit
ec79eafe43
4 changed files with 22 additions and 6 deletions
|
@ -146,6 +146,12 @@ function FormFieldsTelegram() {
|
|||
help="Reverse proxy domain for api.telegram.org, only needs to be specified if the network you are using has blocked the Telegram API."
|
||||
placeholder="http(s)://ip:port"
|
||||
/>
|
||||
<TextFieldWide
|
||||
name="username"
|
||||
label="Sender"
|
||||
help="Custom sender name to show at the top of a notification"
|
||||
placeholder="autobrr"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -373,7 +379,8 @@ export function NotificationAddForm({ isOpen, toggle }: AddProps) {
|
|||
type: "",
|
||||
name: "",
|
||||
webhook: "",
|
||||
events: []
|
||||
events: [],
|
||||
username: ""
|
||||
}}
|
||||
onSubmit={onSubmit}
|
||||
validate={validate}
|
||||
|
@ -577,6 +584,7 @@ interface InitialValues {
|
|||
topic?: string;
|
||||
host?: string;
|
||||
events: NotificationEvent[];
|
||||
username?: string
|
||||
}
|
||||
|
||||
export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateProps) {
|
||||
|
@ -626,7 +634,8 @@ export function NotificationUpdateForm({ isOpen, toggle, notification }: UpdateP
|
|||
channel: notification.channel,
|
||||
topic: notification.topic,
|
||||
host: notification.host,
|
||||
events: notification.events || []
|
||||
events: notification.events || [],
|
||||
username: notification.username
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
1
web/src/types/Notification.d.ts
vendored
1
web/src/types/Notification.d.ts
vendored
|
@ -25,4 +25,5 @@ interface ServiceNotification {
|
|||
priority?: number;
|
||||
topic?: string;
|
||||
host?: string;
|
||||
username?: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue