mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(notifications): add LunaSea support (#1284)
* feat(notifications): add lunasea * fix(web): truncate overflow in PasswordFieldWide * refactor(notifications): centralize msg building Left the building logic in discord.go and notifiarr.go as is because of their unique structure. * refactor: moved components and swapped to outline - Refactored the iconComponentMap to use a single iconStyle variable. * upped size from 4 to 5 * rename NotificationBuilder function
This commit is contained in:
parent
da365da17c
commit
a89a1a55d9
13 changed files with 266 additions and 203 deletions
|
@ -70,6 +70,36 @@ function FormFieldsNotifiarr() {
|
|||
);
|
||||
}
|
||||
|
||||
function FormFieldsLunaSea() {
|
||||
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>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
LunaSea offers notifications across all devices linked to your account (User-Based) or to a single device without an account, using a unique webhook per device (Device-Based).
|
||||
</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
{"Read the "}
|
||||
<ExternalLink
|
||||
href="https://docs.lunasea.app/lunasea/notifications"
|
||||
className="font-medium text-blue-500 underline underline-offset-1 hover:text-blue-400"
|
||||
>
|
||||
LunaSea docs
|
||||
</ExternalLink>
|
||||
{"."}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<PasswordFieldWide
|
||||
name="webhook"
|
||||
label="Webhook URL"
|
||||
help="LunaSea Webhook URL"
|
||||
placeholder="https://notify.lunasea.app/v1/custom/user/TOKEN"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function FormFieldsTelegram() {
|
||||
return (
|
||||
<div className="border-t border-gray-200 dark:border-gray-700 py-4">
|
||||
|
@ -172,7 +202,8 @@ const componentMap: componentMapType = {
|
|||
NOTIFIARR: <FormFieldsNotifiarr />,
|
||||
TELEGRAM: <FormFieldsTelegram />,
|
||||
PUSHOVER: <FormFieldsPushover />,
|
||||
GOTIFY: <FormFieldsGotify />
|
||||
GOTIFY: <FormFieldsGotify />,
|
||||
LUNASEA: <FormFieldsLunaSea />
|
||||
};
|
||||
|
||||
interface NotificationAddFormValues {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue