mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
Also fixed Torrent form fields
This commit is contained in:
@@ -321,9 +321,20 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{(form.values.type === 'Deluge' ||
|
||||
form.values.type === 'Transmission' ||
|
||||
form.values.type === 'qBittorrent') && (
|
||||
{form.values.type === 'Deluge' && (
|
||||
<>
|
||||
<TextInput
|
||||
label="Password"
|
||||
placeholder="password"
|
||||
value={form.values.password}
|
||||
onChange={(event) => {
|
||||
form.setFieldValue('password', event.currentTarget.value);
|
||||
}}
|
||||
error={form.errors.password && 'Invalid password'}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{form.values.type === 'Transmission' && (
|
||||
<>
|
||||
<TextInput
|
||||
label="Username"
|
||||
@@ -336,7 +347,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
||||
/>
|
||||
<TextInput
|
||||
label="Password"
|
||||
placeholder="password"
|
||||
placeholder="adminadmin"
|
||||
value={form.values.password}
|
||||
onChange={(event) => {
|
||||
form.setFieldValue('password', event.currentTarget.value);
|
||||
|
||||
@@ -53,7 +53,7 @@ async function Post(req: NextApiRequest, res: NextApiResponse) {
|
||||
...(
|
||||
await new Transmission({
|
||||
baseUrl: service.url,
|
||||
username: service.username,
|
||||
username: 'username' in service ? service.username : '',
|
||||
password: 'password' in service ? service.password : '',
|
||||
}).getAllData()
|
||||
).torrents
|
||||
|
||||
Reference in New Issue
Block a user