blob: f486dd95c578f10df356740c4e86cd968c83fb7f [file] [log] [blame]
Adrien BĂ©raud6ecaa402021-04-06 17:37:25 -04001import React from 'react';
2
3import Typography from '@material-ui/core/Typography';
4
5import JamiIdCard from './JamiIdCard';
6import List from '@material-ui/core/List';
7import ListItem from '@material-ui/core/ListItem';
8import ListItemIcon from '@material-ui/core/ListItemIcon';
9import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
10import ListItemText from '@material-ui/core/ListItemText';
11import ListSubheader from '@material-ui/core/ListSubheader';
12import Switch from '@material-ui/core/Switch';
13import PhoneCallbackIcon from '@material-ui/icons/PhoneCallback';
14import GroupRoundedIcon from '@material-ui/icons/GroupRounded';
15import Account from '../../../model/Account';
16
17class AccountPreferences extends React.Component {
18
19 render() {
20 const account = this.props.account
21 const isJamiAccount = account.getType() === Account.TYPE_JAMI
22 return (
23 <React.Fragment>
24 <Typography variant="h2" component="h2">Jami account</Typography>
25
26 {isJamiAccount &&
27 <JamiIdCard account={account} />}
28
29 <List subheader={<ListSubheader>Settings</ListSubheader>}>
30 <ListItem>
31 <ListItemIcon>
32 <GroupRoundedIcon />
33 </ListItemIcon>
34 <ListItemText id="switch-list-label-rendezvous" primary="Rendez-Vous point" />
35 <ListItemSecondaryAction>
36 <Switch
37 edge="end"
38 /*onChange={handleToggle('wifi')}*/
39 checked={account.isRendezVous()}
40 inputProps={{ 'aria-labelledby': 'switch-list-label-wifi' }}
41 />
42 </ListItemSecondaryAction>
43 </ListItem>
44 <ListItem>
45 <ListItemIcon>
46 <PhoneCallbackIcon />
47 </ListItemIcon>
48 <ListItemText id="switch-list-label-publicin" primary="Allow connection from unkown peers" />
49 <ListItemSecondaryAction>
50 <Switch
51 edge="end"
52 /*onChange={handleToggle('bluetooth')}*/
53 checked={account.isPublicIn()}
54 inputProps={{ 'aria-labelledby': 'switch-list-label-bluetooth' }}
55 />
56 </ListItemSecondaryAction>
57 </ListItem>
58 </List>
59 </React.Fragment>)
60 }
61}
62
63export default AccountPreferences;