mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(lists): plaintext only accept URLs (#1901)
fix(web): update plaintext list form to only accept URLs
This commit is contained in:
parent
c1c97d2d97
commit
0104ca4a28
1 changed files with 5 additions and 15 deletions
|
@ -678,8 +678,6 @@ function ListTypeTrakt() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function ListTypePlainText() {
|
function ListTypePlainText() {
|
||||||
const { values } = useFormikContext<List>();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="border-t border-gray-200 dark:border-gray-700 py-4">
|
<div className="border-t border-gray-200 dark:border-gray-700 py-4">
|
||||||
<div className="px-4 space-y-1">
|
<div className="px-4 space-y-1">
|
||||||
|
@ -687,25 +685,17 @@ function ListTypePlainText() {
|
||||||
Source list
|
Source list
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||||
Use a Trakt list or one of the default autobrr hosted lists.
|
Use a plain text list with one item per line.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SelectFieldCreatable
|
<TextFieldWide
|
||||||
name="url"
|
name="url"
|
||||||
label="List URL"
|
label="List URL"
|
||||||
help="Default Trakt lists. Override with your own."
|
help="URL to a plain text file with one item per line"
|
||||||
options={ListsTraktOptions.map(u => ({ value: u.value, label: u.label, key: u.label }))}
|
placeholder="https://example.com/list.txt"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{!values.url.startsWith("https://api.autobrr.com/") && (
|
|
||||||
<PasswordFieldWide
|
|
||||||
name="api_key"
|
|
||||||
label="API Key"
|
|
||||||
help="Trakt API Key. Required for private lists."
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend className="sr-only">Settings</legend>
|
<legend className="sr-only">Settings</legend>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue