mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update mui based layout ui
This commit is contained in:
parent
bfbdffdff5
commit
4e7f0136f7
14 changed files with 163 additions and 194 deletions
|
@ -0,0 +1,33 @@
|
|||
import Box from '@mui/material/Box';
|
||||
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import React from 'react';
|
||||
|
||||
import { useApi } from 'hooks/useApi';
|
||||
import { useSystemInfo } from 'hooks/useSystemInfo';
|
||||
import ListItemLink from 'components/ListItemLink';
|
||||
|
||||
import appIcon from 'assets/img/icon-transparent.png';
|
||||
|
||||
const DrawerHeaderLink = () => {
|
||||
const { api } = useApi();
|
||||
const { data: systemInfo } = useSystemInfo(api);
|
||||
|
||||
return (
|
||||
<ListItemLink to='/'>
|
||||
<ListItemIcon sx={{ minWidth: 56 }}>
|
||||
<Box
|
||||
component='img'
|
||||
src={appIcon}
|
||||
sx={{ height: '2.5rem' }}
|
||||
/>
|
||||
</ListItemIcon>
|
||||
<ListItemText
|
||||
primary={systemInfo?.ServerName || 'Jellyfin'}
|
||||
primaryTypographyProps={{ variant: 'h6' }}
|
||||
secondary={systemInfo?.Version}
|
||||
/>
|
||||
</ListItemLink>);
|
||||
};
|
||||
|
||||
export default DrawerHeaderLink;
|
Loading…
Add table
Add a link
Reference in a new issue