From 62b789321d2eb9903daad56ff9447121d848a433 Mon Sep 17 00:00:00 2001 From: Norman <83409549+NormanJS@users.noreply.github.com> Date: Thu, 22 Sep 2022 22:14:52 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20*seerr=20API=20key=20link?= =?UTF-8?q?=20(#446)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: NormanJS --- src/components/AppShelf/AddAppShelfItem.tsx | 3 ++- src/components/AppShelf/apiKeyPaths.json | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/components/AppShelf/apiKeyPaths.json diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index 3d63e5772..804e4f826 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -26,6 +26,7 @@ import { useEffect, useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; import { useConfig } from '../../tools/state'; import { tryMatchPort, ServiceTypeList, StatusCodes, Config } from '../../tools/types'; +import apiKeyPaths from './apiKeyPaths.json'; import Tip from '../layout/Tip'; export function AddItemShelfButton(props: any) { @@ -307,7 +308,7 @@ export function AddAppShelfItemForm(props: AddAppShelfItemFormProps) { target="_blank" weight="bold" style={{ fontStyle: 'inherit', fontSize: 'inherit' }} - href={`${hostname}/settings/general`} + href={`${hostname}/${apiKeyPaths[form.values.type as keyof typeof apiKeyPaths]}`} > {t('modal.tabs.options.form.integrations.apiKey.tip.link')} diff --git a/src/components/AppShelf/apiKeyPaths.json b/src/components/AppShelf/apiKeyPaths.json new file mode 100644 index 000000000..3ecd0f338 --- /dev/null +++ b/src/components/AppShelf/apiKeyPaths.json @@ -0,0 +1,9 @@ +{ + "Jellyseerr": "settings", + "Overseerr": "settings", + "Sonarr": "settings/general", + "Radarr": "settings/general", + "Readarr": "settings/general", + "Lidarr": "settings/general", + "Sabnzbd": "sabnzbd/config/general" +}