2021-06-09 18:35:20 -08:00
|
|
|
import { SimpleForm, Title, useTranslate } from 'react-admin'
|
|
|
|
|
import { Card } from '@material-ui/core'
|
2020-03-31 05:35:44 -08:00
|
|
|
import { makeStyles } from '@material-ui/core/styles'
|
2021-06-09 18:35:20 -08:00
|
|
|
import { SelectLanguage } from './SelectLanguage'
|
|
|
|
|
import { SelectTheme } from './SelectTheme'
|
|
|
|
|
import { SelectDefaultView } from './SelectDefaultView'
|
|
|
|
|
import { NotificationsToggle } from './NotificationsToggle'
|
2021-06-21 17:20:44 -08:00
|
|
|
import { LastfmScrobbleToggle } from './LastfmScrobbleToggle'
|
2021-10-30 08:17:42 -08:00
|
|
|
import { ListenBrainzScrobbleToggle } from './ListenBrainzScrobbleToggle'
|
2021-06-10 17:04:26 -08:00
|
|
|
import config from '../config'
|
2020-03-31 05:35:44 -08:00
|
|
|
|
|
|
|
|
const useStyles = makeStyles({
|
2020-04-02 14:46:09 -08:00
|
|
|
root: { marginTop: '1em' },
|
2020-03-31 05:35:44 -08:00
|
|
|
})
|
|
|
|
|
|
2020-04-13 17:19:31 -08:00
|
|
|
const Personal = () => {
|
|
|
|
|
const translate = useTranslate()
|
|
|
|
|
const classes = useStyles()
|
2020-03-31 13:02:22 -08:00
|
|
|
|
2020-03-31 05:35:44 -08:00
|
|
|
return (
|
2020-04-02 14:46:09 -08:00
|
|
|
<Card className={classes.root}>
|
2020-04-13 15:51:03 -08:00
|
|
|
<Title title={'Navidrome - ' + translate('menu.personal.name')} />
|
2020-08-17 07:19:39 -08:00
|
|
|
<SimpleForm toolbar={null} variant={'outlined'}>
|
2020-04-13 17:19:31 -08:00
|
|
|
<SelectTheme />
|
|
|
|
|
<SelectLanguage />
|
2020-07-29 10:41:18 -08:00
|
|
|
<SelectDefaultView />
|
2020-11-19 19:06:09 -09:00
|
|
|
<NotificationsToggle />
|
2021-07-02 05:50:07 -08:00
|
|
|
{config.lastFMEnabled && <LastfmScrobbleToggle />}
|
2021-11-17 17:11:53 -09:00
|
|
|
{config.listenBrainzEnabled && <ListenBrainzScrobbleToggle />}
|
2020-04-02 14:46:09 -08:00
|
|
|
</SimpleForm>
|
2020-03-31 05:35:44 -08:00
|
|
|
</Card>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-31 17:28:50 -08:00
|
|
|
export default Personal
|