This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from Taliayaya/Organisation
Organisations
- Loading branch information
Showing
52 changed files
with
5,058 additions
and
2,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from 'react' | ||
import Stack from '@mui/material/Stack' | ||
import Button from '@mui/material/Button' | ||
import Snackbar from '@mui/material/Snackbar' | ||
import MuiAlert from '@mui/material/Alert' | ||
|
||
const Alert = React.forwardRef(function Alert(props, ref) { | ||
return <MuiAlert elevation={6} ref={ref} variant="filled" {...props} /> | ||
}) | ||
|
||
export default function CustomizedSnackbars({ | ||
message, | ||
open, | ||
setOpen, | ||
severity, | ||
}) { | ||
const handleClose = (event, reason) => { | ||
if (reason === 'clickaway') { | ||
return | ||
} | ||
|
||
setOpen(false) | ||
} | ||
|
||
return ( | ||
<Snackbar open={open} autoHideDuration={6000} onClose={handleClose}> | ||
<Alert | ||
onClose={handleClose} | ||
severity={severity} | ||
sx={{ width: '100%' }} | ||
> | ||
{message} | ||
</Alert> | ||
</Snackbar> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,8 @@ const StyledFooterLink = styled(Link)` | |
&:active, | ||
&:focus, | ||
&:hover { | ||
{ | ||
color: #3366cc; | ||
text-decoration: none; | ||
} | ||
color: #3366cc; | ||
text-decoration: none; | ||
} | ||
` | ||
|
||
|
@@ -25,7 +23,7 @@ export default function Footer() { | |
<address> | ||
<a | ||
className="footer__btn" | ||
href="mailto:pando.contact.mayeux@gmail.com" | ||
href="mailto:apando[email protected]" | ||
> | ||
Nous contacter | ||
</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { List, ListItem, ListItemText } from '@mui/material' | ||
import PropTypes from 'prop-types' | ||
import React from 'react' | ||
|
||
function DisplayServerList({ serverList, handleSelect, isSubServer = null }) { | ||
return ( | ||
<List sx={{ pt: 0 }}> | ||
{serverList.map(({ id, name }) => ( | ||
<ListItem | ||
key={id} | ||
button | ||
onClick={() => handleSelect(id, name, isSubServer)} | ||
> | ||
<ListItemText>{name}</ListItemText> | ||
</ListItem> | ||
))} | ||
</List> | ||
) | ||
} | ||
|
||
DisplayServerList.propTypes = { | ||
serverList: PropTypes.arrayOf(PropTypes.object).isRequired, | ||
handleSelect: PropTypes.func.isRequired, | ||
} | ||
|
||
export default DisplayServerList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { | ||
Accordion, | ||
AccordionDetails, | ||
AccordionSummary, | ||
Button, | ||
Dialog, | ||
DialogContent, | ||
DialogTitle, | ||
Divider, | ||
List, | ||
ListItem, | ||
ListItemText, | ||
Typography, | ||
} from '@mui/material' | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import { ExpandMore } from '@mui/icons-material' | ||
import DisplayServerList from './DisplayServerList' | ||
|
||
function ServerSelection({ serverList, handleServerSelect, orgaServers }) { | ||
const [open, setOpen] = React.useState(false) | ||
const handleSelect = (id, name, isSubServer = false) => { | ||
handleServerSelect(id, name, isSubServer) | ||
handleClose() | ||
} | ||
|
||
const handleClose = () => { | ||
setOpen(false) | ||
} | ||
|
||
return ( | ||
<React.Fragment> | ||
<Button onClick={() => setOpen(true)}>Changer de Serveur</Button> | ||
<Dialog onClose={handleClose} open={open} scroll="paper"> | ||
<DialogTitle>Selectionner un serveur</DialogTitle> | ||
<DialogContent> | ||
<Typography | ||
sx={{ paddingBottom: 1 }} | ||
color="text.secondary" | ||
variant="body1" | ||
> | ||
Organisations | ||
</Typography> | ||
<Divider /> | ||
{orgaServers.map(({ name, servers }) => ( | ||
<Accordion sx={{ marginTop: 2 }} key={name}> | ||
<AccordionSummary expandIcon={<ExpandMore />}> | ||
{name} | ||
</AccordionSummary> | ||
<AccordionDetails> | ||
<DisplayServerList | ||
serverList={servers} | ||
handleSelect={handleSelect} | ||
isSubServer={name} | ||
/> | ||
</AccordionDetails> | ||
</Accordion> | ||
))} | ||
<Typography | ||
sx={{ paddingTop: 2, paddingBottom: 1 }} | ||
color="text.secondary" | ||
variant="body1" | ||
> | ||
Serveurs | ||
</Typography> | ||
<Divider /> | ||
<DisplayServerList | ||
serverList={serverList} | ||
handleSelect={handleSelect} | ||
/> | ||
</DialogContent> | ||
</Dialog> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
ServerSelection.propTypes = { | ||
handleServerSelect: PropTypes.func.isRequired, | ||
serverList: PropTypes.arrayOf(PropTypes.objectOf(PropTypes.string)), | ||
} | ||
|
||
export default ServerSelection |
Oops, something went wrong.