mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(irc): support optional SASL and NickServ auth (#511)
* feat(irc): support SASL and NickServ auth * feat(irc): add missing fields * feat(irc): support SASL and NickServ auth * feat(irc): add missing fields * feat(irc): add validation * feat(indexers): unify and set required values * feat(irc): add postgres migrations * feat(irc): use nick as handlerkey * feat(irc): use account for nickserv * fix(irc): pg db migration
This commit is contained in:
parent
4ef0408f33
commit
4bf023d030
65 changed files with 1404 additions and 631 deletions
|
@ -1,4 +1,4 @@
|
|||
import type { FieldProps } from "formik";
|
||||
import type { FieldProps, FieldValidator } from "formik";
|
||||
import { Field } from "formik";
|
||||
import { classNames } from "../../utils";
|
||||
import { useToggle } from "../../hooks/hooks";
|
||||
|
@ -14,6 +14,7 @@ interface TextFieldWideProps {
|
|||
defaultValue?: string;
|
||||
required?: boolean;
|
||||
hidden?: boolean;
|
||||
validate?: FieldValidator;
|
||||
}
|
||||
|
||||
export const TextFieldWide = ({
|
||||
|
@ -23,7 +24,8 @@ export const TextFieldWide = ({
|
|||
placeholder,
|
||||
defaultValue,
|
||||
required,
|
||||
hidden
|
||||
hidden,
|
||||
validate
|
||||
}: TextFieldWideProps) => (
|
||||
<div hidden={hidden} className="space-y-1 p-4 sm:space-y-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<div>
|
||||
|
@ -36,6 +38,7 @@ export const TextFieldWide = ({
|
|||
name={name}
|
||||
value={defaultValue}
|
||||
required={required}
|
||||
validate={validate}
|
||||
>
|
||||
{({ field, meta }: FieldProps) => (
|
||||
<input
|
||||
|
@ -66,6 +69,7 @@ interface PasswordFieldWideProps {
|
|||
help?: string;
|
||||
required?: boolean;
|
||||
defaultVisible?: boolean;
|
||||
validate?: FieldValidator;
|
||||
}
|
||||
|
||||
export const PasswordFieldWide = ({
|
||||
|
@ -75,7 +79,8 @@ export const PasswordFieldWide = ({
|
|||
defaultValue,
|
||||
help,
|
||||
required,
|
||||
defaultVisible
|
||||
defaultVisible,
|
||||
validate
|
||||
}: PasswordFieldWideProps) => {
|
||||
const [isVisible, toggleVisibility] = useToggle(defaultVisible);
|
||||
|
||||
|
@ -90,6 +95,7 @@ export const PasswordFieldWide = ({
|
|||
<Field
|
||||
name={name}
|
||||
defaultValue={defaultValue}
|
||||
validate={validate}
|
||||
>
|
||||
{({ field, meta }: FieldProps) => (
|
||||
<div className="relative">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue