fix: added deep links to issues and status badges (#3065)

This commit is contained in:
Brandon Cohen
2022-10-15 01:39:33 -04:00
committed by GitHub
parent 1dfa9431a9
commit bfe56c3470
6 changed files with 99 additions and 74 deletions

View File

@@ -7,6 +7,7 @@ import PageTitle from '@app/components/Common/PageTitle';
import IssueComment from '@app/components/IssueDetails/IssueComment';
import IssueDescription from '@app/components/IssueDetails/IssueDescription';
import { issueOptions } from '@app/components/IssueModal/constants';
import useDeepLinks from '@app/hooks/useDeepLinks';
import { Permission, useUser } from '@app/hooks/useUser';
import globalMessages from '@app/i18n/globalMessages';
import Error from '@app/pages/_error';
@@ -88,6 +89,13 @@ const IssueDetails = () => {
: null
);
const { plexUrl, plexUrl4k } = useDeepLinks({
plexUrl: data?.mediaInfo?.plexUrl,
plexUrl4k: data?.mediaInfo?.plexUrl4k,
iOSPlexUrl: data?.mediaInfo?.iOSPlexUrl,
iOSPlexUrl4k: data?.mediaInfo?.iOSPlexUrl4k,
});
const CommentSchema = Yup.object().shape({
message: Yup.string().required(),
});
@@ -354,7 +362,7 @@ const IssueDetails = () => {
{issueData?.media.plexUrl && (
<Button
as="a"
href={issueData?.media.plexUrl}
href={plexUrl}
target="_blank"
rel="noreferrer"
className="w-full"
@@ -387,7 +395,7 @@ const IssueDetails = () => {
{issueData?.media.plexUrl4k && (
<Button
as="a"
href={issueData?.media.plexUrl4k}
href={plexUrl4k}
target="_blank"
rel="noreferrer"
className="w-full"
@@ -590,7 +598,7 @@ const IssueDetails = () => {
{issueData?.media.plexUrl && (
<Button
as="a"
href={issueData?.media.plexUrl}
href={plexUrl}
target="_blank"
rel="noreferrer"
className="w-full"
@@ -623,7 +631,7 @@ const IssueDetails = () => {
{issueData?.media.plexUrl4k && (
<Button
as="a"
href={issueData?.media.plexUrl4k}
href={plexUrl4k}
target="_blank"
rel="noreferrer"
className="w-full"