diff --git a/src/components/cardbuilder/Card/CardOverlayButtons.tsx b/src/components/cardbuilder/Card/CardOverlayButtons.tsx index 0ac8463969..c2938c1088 100644 --- a/src/components/cardbuilder/Card/CardOverlayButtons.tsx +++ b/src/components/cardbuilder/Card/CardOverlayButtons.tsx @@ -1,8 +1,8 @@ import React, { FC } from 'react'; -import Box from '@mui/material/Box'; import ButtonGroup from '@mui/material/ButtonGroup'; import classNames from 'classnames'; - +import { appRouter } from 'components/router/appRouter'; +import escapeHTML from 'escape-html'; import PlayArrowIconButton from '../../common/PlayArrowIconButton'; import MoreVertIconButton from '../../common/MoreVertIconButton'; @@ -43,6 +43,10 @@ const CardOverlayButtons: FC = ({ overlayPlayButton = item.MediaType === 'Video'; } + const url = appRouter.getRouteUrl(item, { + parentId: cardOptions.parentId + }); + const btnCssClass = classNames( 'paper-icon-button-light', 'cardOverlayButton', @@ -55,8 +59,10 @@ const CardOverlayButtons: FC = ({ ); return ( - = ({ borderRadius: '0.2em' }} > + {cardOptions.centerPlayButton && ( = ({ /> )} - + ); }; diff --git a/src/types/dataAttributes.ts b/src/types/dataAttributes.ts index 6e91b125cd..1258d61cd4 100644 --- a/src/types/dataAttributes.ts +++ b/src/types/dataAttributes.ts @@ -2,7 +2,7 @@ import type { CollectionType, UserItemDataDto } from '@jellyfin/sdk/lib/generate import type { NullableBoolean, NullableNumber, NullableString } from './itemDto'; export type AttributesOpts = { - context?: CollectionType | undefined, + context?: CollectionType, parentId?: NullableString, collectionId?: NullableString, playlistId?: NullableString,