mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-13 12:57:10 +02:00
* chore(ui): Fix minor inconsistencies 1. The icons in the user menu are a mix of MUI and react-icons. Move them all to react-icons, and use a standard size (24px) 2. On missing files page, provide a custom Empty component that just removes 'yet' * use RA's builtin support for custom empty message Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org> Co-authored-by: Deluan <deluan@navidrome.org>
31 lines
795 B
JavaScript
31 lines
795 B
JavaScript
import React, { forwardRef } from 'react'
|
|
import { MenuItemLink, useTranslate } from 'react-admin'
|
|
import { MdTune } from 'react-icons/md'
|
|
import { makeStyles } from '@material-ui/core'
|
|
|
|
const useStyles = makeStyles((theme) => ({
|
|
menuItem: {
|
|
color: theme.palette.text.secondary,
|
|
},
|
|
}))
|
|
|
|
const PersonalMenu = forwardRef(({ onClick, sidebarIsOpen, dense }, ref) => {
|
|
const translate = useTranslate()
|
|
const classes = useStyles()
|
|
return (
|
|
<MenuItemLink
|
|
ref={ref}
|
|
to="/personal"
|
|
primaryText={translate('menu.personal.name')}
|
|
leftIcon={<MdTune size={24} />}
|
|
onClick={onClick}
|
|
className={classes.menuItem}
|
|
sidebarIsOpen={sidebarIsOpen}
|
|
dense={dense}
|
|
/>
|
|
)
|
|
})
|
|
|
|
PersonalMenu.displayName = 'PersonalMenu'
|
|
|
|
export default PersonalMenu
|