1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix navigation for mobile layout

This commit is contained in:
grafixeyehero 2024-01-31 05:25:38 +03:00
parent e3b618f2fb
commit 876fbee53e
2 changed files with 13 additions and 6 deletions

View file

@ -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<CardOverlayButtonsProps> = ({
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<CardOverlayButtonsProps> = ({
);
return (
<Box
sx={{
<a
href={url}
aria-label={escapeHTML(item.Name)}
style={{
position: 'absolute',
top: 0,
left: 0,
@ -66,6 +72,7 @@ const CardOverlayButtons: FC<CardOverlayButtonsProps> = ({
borderRadius: '0.2em'
}}
>
{cardOptions.centerPlayButton && (
<PlayArrowIconButton
className={centerPlayButtonClass}
@ -89,7 +96,7 @@ const CardOverlayButtons: FC<CardOverlayButtonsProps> = ({
/>
)}
</ButtonGroup>
</Box>
</a>
);
};

View file

@ -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,