mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(download-clients): porla implement rules (#711)
* feat(downloadclients): Porla implement rules * feat(downloadclients): Porla add basic auth support * feat(porla): use new token for auth * feat(porla): update check can download rules
This commit is contained in:
parent
209e23de4f
commit
d100703784
9 changed files with 248 additions and 59 deletions
|
@ -162,7 +162,7 @@ function FormFieldsQbit() {
|
|||
|
||||
function FormFieldsPorla() {
|
||||
const {
|
||||
values: {}
|
||||
values: { tls, settings }
|
||||
} = useFormikContext<InitialValues>();
|
||||
|
||||
return (
|
||||
|
@ -173,7 +173,25 @@ function FormFieldsPorla() {
|
|||
help="Eg. http(s)://client.domain.ltd, http(s)://domain.ltd/porla, http://domain.ltd:port"
|
||||
/>
|
||||
|
||||
<SwitchGroupWide name="tls" label="TLS" />
|
||||
|
||||
<PasswordFieldWide name="settings.apikey" label="Auth token" />
|
||||
|
||||
{tls && (
|
||||
<SwitchGroupWide
|
||||
name="tls_skip_verify"
|
||||
label="Skip TLS verification (insecure)"
|
||||
/>
|
||||
)}
|
||||
|
||||
<SwitchGroupWide name="settings.basic.auth" label="Basic auth" />
|
||||
|
||||
{settings.basic?.auth === true && (
|
||||
<>
|
||||
<TextFieldWide name="settings.basic.username" label="Username" />
|
||||
<PasswordFieldWide name="settings.basic.password" label="Password" />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -264,7 +282,7 @@ function FormFieldsRulesBasic() {
|
|||
);
|
||||
}
|
||||
|
||||
function FormFieldsRules() {
|
||||
function FormFieldsRulesQbit() {
|
||||
const {
|
||||
values: { settings }
|
||||
} = useFormikContext<InitialValues>();
|
||||
|
@ -325,7 +343,8 @@ function FormFieldsRules() {
|
|||
export const rulesComponentMap: componentMapType = {
|
||||
DELUGE_V1: <FormFieldsRulesBasic/>,
|
||||
DELUGE_V2: <FormFieldsRulesBasic/>,
|
||||
QBITTORRENT: <FormFieldsRules/>
|
||||
QBITTORRENT: <FormFieldsRulesQbit/>,
|
||||
PORLA: <FormFieldsRulesBasic/>
|
||||
};
|
||||
|
||||
interface formButtonsProps {
|
||||
|
|
|
@ -398,20 +398,6 @@ const TypeForm = ({ action, idx, clients }: TypeFormProps) => {
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
case "RADARR":
|
||||
case "SONARR":
|
||||
case "LIDARR":
|
||||
case "WHISPARR":
|
||||
case "READARR":
|
||||
return (
|
||||
<div className="mt-6 grid grid-cols-12 gap-6">
|
||||
<DownloadClientSelect
|
||||
name={`actions.${idx}.client_id`}
|
||||
action={action}
|
||||
clients={clients}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
case "PORLA":
|
||||
return (
|
||||
<div className="w-full">
|
||||
|
@ -448,6 +434,20 @@ const TypeForm = ({ action, idx, clients }: TypeFormProps) => {
|
|||
</CollapsableSection>
|
||||
</div>
|
||||
);
|
||||
case "RADARR":
|
||||
case "SONARR":
|
||||
case "LIDARR":
|
||||
case "WHISPARR":
|
||||
case "READARR":
|
||||
return (
|
||||
<div className="mt-6 grid grid-cols-12 gap-6">
|
||||
<DownloadClientSelect
|
||||
name={`actions.${idx}.client_id`}
|
||||
action={action}
|
||||
clients={clients}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
default:
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue