mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 15:35:55 +01:00
@@ -111,6 +111,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
|||||||
apiKey: props.apiKey ?? (undefined as unknown as string),
|
apiKey: props.apiKey ?? (undefined as unknown as string),
|
||||||
username: props.username ?? (undefined as unknown as string),
|
username: props.username ?? (undefined as unknown as string),
|
||||||
password: props.password ?? (undefined as unknown as string),
|
password: props.password ?? (undefined as unknown as string),
|
||||||
|
openedUrl: props.openedUrl ?? (undefined as unknown as string),
|
||||||
},
|
},
|
||||||
validate: {
|
validate: {
|
||||||
apiKey: () => null,
|
apiKey: () => null,
|
||||||
@@ -208,6 +209,11 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
|||||||
placeholder="http://localhost:7575"
|
placeholder="http://localhost:7575"
|
||||||
{...form.getInputProps('url')}
|
{...form.getInputProps('url')}
|
||||||
/>
|
/>
|
||||||
|
<TextInput
|
||||||
|
label="Opened url"
|
||||||
|
placeholder="http://sonarr.remote.com"
|
||||||
|
{...form.getInputProps('openedUrl')}
|
||||||
|
/>
|
||||||
<Select
|
<Select
|
||||||
label="Service type"
|
label="Service type"
|
||||||
defaultValue="Other"
|
defaultValue="Other"
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ export function AppShelfItem(props: any) {
|
|||||||
src={service.icon}
|
src={service.icon}
|
||||||
fit="contain"
|
fit="contain"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open(service.url);
|
if (service.openedUrl) window.open(service.openedUrl, '_blank');
|
||||||
|
else window.open(service.url);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</motion.i>
|
</motion.i>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export default function AppShelfMenu(props: any) {
|
|||||||
apiKey={service.apiKey}
|
apiKey={service.apiKey}
|
||||||
username={service.username}
|
username={service.username}
|
||||||
password={service.password}
|
password={service.password}
|
||||||
|
openedUrl={service.openedUrl}
|
||||||
message="Save service"
|
message="Save service"
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -53,4 +53,5 @@ export interface serviceItem {
|
|||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
username?: string;
|
username?: string;
|
||||||
|
openedUrl?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user