dark sidebar and dialogs

This commit is contained in:
nikk gitanes
2021-06-17 16:11:30 +03:00
parent 22d1f733f8
commit 545432678b
5 changed files with 135 additions and 124 deletions

View File

@@ -9,20 +9,11 @@ import InfoIcon from '@material-ui/icons/Info'
import ListItem from '@material-ui/core/ListItem'
import ListItemIcon from '@material-ui/core/ListItemIcon'
import ListItemText from '@material-ui/core/ListItemText'
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles'
import { useTranslation } from 'react-i18next'
import { echoHost } from 'utils/Hosts'
export default function AboutDialog() {
const { t } = useTranslation()
// https://material-ui.com/ru/customization/default-theme/
const darkTheme = createMuiTheme({
palette: {
type: 'dark',
primary: { main: '#00a572' },
background: { paper: '#575757' },
},
})
const [open, setOpen] = useState(false)
const [torrServerVersion, setTorrServerVersion] = useState('')
useEffect(() => {
@@ -38,61 +29,59 @@ export default function AboutDialog() {
<ListItemText primary={t('About')} />
</ListItem>
<ThemeProvider theme={darkTheme}>
<Dialog
open={open}
onClose={() => setOpen(false)}
aria-labelledby='form-dialog-title'
fullWidth='true'
maxWidth='sm'
>
<DialogTitle id='form-dialog-title'>{t('About')}</DialogTitle>
<Dialog
open={open}
onClose={() => setOpen(false)}
aria-labelledby='form-dialog-title'
fullWidth='true'
maxWidth='sm'
>
<DialogTitle id='form-dialog-title'>{t('About')}</DialogTitle>
<DialogContent>
<center>
<h2>TorrServer {torrServerVersion}</h2>
<a style={{ color: '#00a572' }} href='https://github.com/YouROK/TorrServer'>
https://github.com/YouROK/TorrServer
</a>
</center>
<DialogContent>
<center>
<h2>TorrServer {torrServerVersion}</h2>
<a style={{ color: '#00a572' }} href='https://github.com/YouROK/TorrServer'>
https://github.com/YouROK/TorrServer
</a>
<h2>{t('ThanksToEveryone')}</h2>
</center>
<DialogContent>
<center>
<h2>{t('ThanksToEveryone')}</h2>
</center>
<br />
<h2>{t('SpecialThanks')}</h2>
<b>anacrolix Matt Joiner</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/anacrolix/'>
github.com/anacrolix
</a>
<br />
<b>nikk</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/tsynik'>
github.com/tsynik
</a>
<br />
<b>dancheskus</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/dancheskus'>
github.com/dancheskus
</a>
<br />
<b>tw1cker Руслан Пахнев</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/Nemiroff'>
github.com/Nemiroff
</a>
<br />
<b>SpAwN_LMG</b>
<br />
</DialogContent>
<br />
<h2>{t('SpecialThanks')}</h2>
<b>anacrolix Matt Joiner</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/anacrolix/'>
github.com/anacrolix
</a>
<br />
<b>nikk</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/tsynik'>
github.com/tsynik
</a>
<br />
<b>dancheskus</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/dancheskus'>
github.com/dancheskus
</a>
<br />
<b>tw1cker Руслан Пахнев</b>&nbsp;
<a style={{ color: '#00a572' }} href='https://github.com/Nemiroff'>
github.com/Nemiroff
</a>
<br />
<b>SpAwN_LMG</b>
<br />
</DialogContent>
</DialogContent>
<DialogActions>
<Button onClick={() => setOpen(false)} color='primary' variant='outlined' autoFocus>
{t('Close')}
</Button>
</DialogActions>
</Dialog>
</ThemeProvider>
<DialogActions>
<Button onClick={() => setOpen(false)} color='primary' variant='outlined' autoFocus>
{t('Close')}
</Button>
</DialogActions>
</Dialog>
</div>
)
}