mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-09-02 19:43:13 +03:00
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { getDisplayVersion } from '@jellyfin/sdk/lib/utils/versioning';
|
|
import Box from '@mui/material/Box';
|
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import React from 'react';
|
|
|
|
import { useSystemInfo } from 'hooks/useSystemInfo';
|
|
import ListItemLink from 'components/ListItemLink';
|
|
|
|
import appIcon from '@jellyfin/ux-web/icon-transparent.png';
|
|
|
|
const DrawerHeaderLink = () => {
|
|
const { data: systemInfo } = useSystemInfo();
|
|
|
|
return (
|
|
<ListItemLink to='/'>
|
|
<ListItemIcon sx={{ minWidth: 56 }}>
|
|
<Box
|
|
component='img'
|
|
src={appIcon}
|
|
sx={{ height: '2.5rem' }}
|
|
/>
|
|
</ListItemIcon>
|
|
<ListItemText
|
|
primary={systemInfo?.ServerName || 'Jellyfin'}
|
|
secondary={getDisplayVersion(systemInfo?.Version)}
|
|
slotProps={{
|
|
primary: { variant: 'h6' }
|
|
}}
|
|
/>
|
|
</ListItemLink>);
|
|
};
|
|
|
|
export default DrawerHeaderLink;
|