mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
✨ Add support for qBittorrent in AddAppShelfItem
This commit is contained in:
@@ -74,6 +74,8 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
|||||||
icon: props.icon ?? '/favicon.svg',
|
icon: props.icon ?? '/favicon.svg',
|
||||||
url: props.url ?? '',
|
url: props.url ?? '',
|
||||||
apiKey: props.apiKey ?? (undefined as unknown as string),
|
apiKey: props.apiKey ?? (undefined as unknown as string),
|
||||||
|
username: props.username ?? (undefined as unknown as string),
|
||||||
|
password: props.password ?? (undefined as unknown as string),
|
||||||
},
|
},
|
||||||
validate: {
|
validate: {
|
||||||
apiKey: () => null,
|
apiKey: () => null,
|
||||||
@@ -188,6 +190,30 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
|||||||
error={form.errors.apiKey && 'Invalid API key'}
|
error={form.errors.apiKey && 'Invalid API key'}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{form.values.type === 'qBittorrent' && (
|
||||||
|
<>
|
||||||
|
<TextInput
|
||||||
|
required
|
||||||
|
label="Username"
|
||||||
|
placeholder="admin"
|
||||||
|
value={form.values.username}
|
||||||
|
onChange={(event) => {
|
||||||
|
form.setFieldValue('username', event.currentTarget.value);
|
||||||
|
}}
|
||||||
|
error={form.errors.username && 'Invalid username'}
|
||||||
|
/>
|
||||||
|
<TextInput
|
||||||
|
required
|
||||||
|
label="Password"
|
||||||
|
placeholder="adminadmin"
|
||||||
|
value={form.values.password}
|
||||||
|
onChange={(event) => {
|
||||||
|
form.setFieldValue('password', event.currentTarget.value);
|
||||||
|
}}
|
||||||
|
error={form.errors.password && 'Invalid password'}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
<Group grow position="center" mt="xl">
|
<Group grow position="center" mt="xl">
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export default function AppShelfMenu(props: any) {
|
|||||||
url={service.url}
|
url={service.url}
|
||||||
icon={service.icon}
|
icon={service.icon}
|
||||||
apiKey={service.apiKey}
|
apiKey={service.apiKey}
|
||||||
|
login={service.login}
|
||||||
|
password={service.password}
|
||||||
message="Save service"
|
message="Save service"
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user