Remove useless files
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
import {useState} from 'react'
|
|
||||||
import {Box, Button, Typography} from '@material-ui/core'
|
|
||||||
import Image from 'next/image'
|
|
||||||
|
|
||||||
import sessionLogo from '../../public/session-logo-50.png'
|
|
||||||
|
|
||||||
import SesyonDialog from './sesyon-dialog'
|
|
||||||
|
|
||||||
export default function JwennSesyon() {
|
|
||||||
const [ouve, meteOuve] = useState(false)
|
|
||||||
|
|
||||||
const handleClickOuve = () => {
|
|
||||||
meteOuve(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFemen = () => {
|
|
||||||
meteOuve(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button style={{marginTop: 10}} variant='outlined' color='primary' onClick={handleClickOuve}>
|
|
||||||
<Box paddingTop={1}>
|
|
||||||
<Image
|
|
||||||
src={sessionLogo}
|
|
||||||
width={50}
|
|
||||||
height={55}
|
|
||||||
placeholder='blur'
|
|
||||||
/>
|
|
||||||
<Typography style={{fontWeight: 'bold'}} variant='h6' component='h1'>
|
|
||||||
Session
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
{ouve && (
|
|
||||||
<SesyonDialog ouve={ouve} handleFemen={handleFemen} />
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
import {useEffect, useState} from 'react'
|
|
||||||
import Image from 'next/image'
|
|
||||||
import PropTypes from 'prop-types'
|
|
||||||
import {withStyles} from '@material-ui/core/styles'
|
|
||||||
import {Box, Button, Divider, Snackbar, useMediaQuery, Link, Dialog} from '@material-ui/core'
|
|
||||||
import MuiDialogTitle from '@material-ui/core/DialogTitle'
|
|
||||||
import MuiDialogContent from '@material-ui/core/DialogContent'
|
|
||||||
import IconButton from '@material-ui/core/IconButton'
|
|
||||||
import CloseIcon from '@material-ui/icons/Close'
|
|
||||||
import Typography from '@material-ui/core/Typography'
|
|
||||||
import MuiAlert from '@material-ui/lab/Alert'
|
|
||||||
import FileCopyIcon from '@material-ui/icons/FileCopy'
|
|
||||||
import AndroidIcon from '@material-ui/icons/Android'
|
|
||||||
import AppleIcon from '@material-ui/icons/Apple'
|
|
||||||
import GetAppIcon from '@material-ui/icons/GetApp'
|
|
||||||
import {Windows, Linux} from '@icons-pack/react-simple-icons'
|
|
||||||
|
|
||||||
import sessionMobile from '../../public/session-mobile-914x1024.png'
|
|
||||||
import sessionDesktop from '../../public/session-desktop-1024x549.png'
|
|
||||||
import QRCode from '../../public/sesyon-qr-code.png'
|
|
||||||
|
|
||||||
const sessionUrl = process.env.NEXT_PUBLIC_SESSION_URL || 'http://sesyon.o-k-i.net'
|
|
||||||
|
|
||||||
function Alert(props) {
|
|
||||||
return <MuiAlert elevation={6} variant='filled' {...props} />
|
|
||||||
}
|
|
||||||
|
|
||||||
const styles = theme => ({
|
|
||||||
root: {
|
|
||||||
margin: 0,
|
|
||||||
padding: theme.spacing(2)
|
|
||||||
},
|
|
||||||
closeButton: {
|
|
||||||
position: 'absolute',
|
|
||||||
right: theme.spacing(1),
|
|
||||||
top: theme.spacing(1),
|
|
||||||
color: theme.palette.grey[500]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const DialogTitle = withStyles(styles)(props => {
|
|
||||||
const {children, classes, onClose, ...other} = props
|
|
||||||
return (
|
|
||||||
<MuiDialogTitle disableTypography className={classes.root} {...other}>
|
|
||||||
<Typography variant='h6'>{children}</Typography>
|
|
||||||
{onClose ? (
|
|
||||||
<IconButton aria-label='close' className={classes.closeButton} onClick={onClose}>
|
|
||||||
<CloseIcon />
|
|
||||||
</IconButton>
|
|
||||||
) : null}
|
|
||||||
</MuiDialogTitle>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
const DialogContent = withStyles(theme => ({
|
|
||||||
root: {
|
|
||||||
padding: theme.spacing(2)
|
|
||||||
}
|
|
||||||
}))(MuiDialogContent)
|
|
||||||
|
|
||||||
export default function SesyonDialog({ouve, handleFemen}) {
|
|
||||||
const isMobile = useMediaQuery('(max-width:800px)')
|
|
||||||
const [error, setError] = useState('')
|
|
||||||
const [success, setSuccess] = useState('')
|
|
||||||
const [ouveSnack, meteOuveSnack] = useState(false)
|
|
||||||
|
|
||||||
const handleFemenSnack = (event, reason) => {
|
|
||||||
if (reason === 'clickaway') {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
meteOuveSnack(false)
|
|
||||||
setSuccess('')
|
|
||||||
setError('')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCopyUrl = () => {
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
navigator.clipboard.writeText(sessionUrl)
|
|
||||||
.then(
|
|
||||||
() => setSuccess('URL copiée avec succès'),
|
|
||||||
() => setError('Error lors de la copie du lien')
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
meteOuveSnack(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (error || success) {
|
|
||||||
meteOuveSnack(true)
|
|
||||||
}
|
|
||||||
}, [error, success, meteOuveSnack])
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Dialog aria-labelledby='customized-dialog-title' open={ouve} onClose={handleFemen}>
|
|
||||||
<DialogTitle style={{textAlign: 'center'}} id='customized-dialog-title' onClose={handleFemen}>
|
|
||||||
Groupe Session
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogContent dividers>
|
|
||||||
<Typography gutterBottom style={{textAlign: 'center', fontWeight: 'bold'}}>
|
|
||||||
Télécharger Session
|
|
||||||
</Typography>
|
|
||||||
<Box style={{display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}}>
|
|
||||||
<Box style={{display: 'flex', justifyContent: 'space-around'}}>
|
|
||||||
<Typography>
|
|
||||||
Mobile
|
|
||||||
</Typography>
|
|
||||||
<Typography>
|
|
||||||
Ordinateur
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<Box style={{display: 'flex', justifyContent: 'space-around'}}>
|
|
||||||
<Box>
|
|
||||||
<Image
|
|
||||||
src={sessionMobile}
|
|
||||||
width={228}
|
|
||||||
height={256}
|
|
||||||
placeholder='blur'
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Divider flexItem orientation='vertical' />
|
|
||||||
<Box style={{alignSelf: 'center'}}>
|
|
||||||
<Image
|
|
||||||
src={sessionDesktop}
|
|
||||||
width={256}
|
|
||||||
height={137}
|
|
||||||
placeholder='blur'
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
<Box style={{display: 'flex', justifyContent: 'space-around'}}>
|
|
||||||
<Box style={{display: 'flex', justifyContent: 'center'}}>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://getsession.org/android'>
|
|
||||||
<IconButton title='Play Store' aria-label='adroid-playstore'>
|
|
||||||
<AndroidIcon fontSize={isMobile ? 'small' : 'large'} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://getsession.org/iphone'>
|
|
||||||
<IconButton title='App Store' aria-label='apple-app-store'>
|
|
||||||
<AppleIcon fontSize={isMobile ? 'small' : 'large'} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://github.com/oxen-io/session-android/releases'>
|
|
||||||
<IconButton title='APK' aria-label='adroid-apk'>
|
|
||||||
<GetAppIcon fontSize={isMobile ? 'small' : 'large'} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
</Box>
|
|
||||||
<Box style={{display: 'flex', justifyContent: 'center'}}>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://getsession.org/mac'>
|
|
||||||
<IconButton title='Mac' aria-label='mac'>
|
|
||||||
<AppleIcon fontSize={isMobile ? 'small' : 'large'} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://getsession.org/windows'>
|
|
||||||
<IconButton title='Windows' aria-label='windows'>
|
|
||||||
<Windows size={isMobile ? 18 : 32} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
<Link target='_blank' rel='noopener noreferrer' href='https://getsession.org/linux'>
|
|
||||||
<IconButton title='Linux' aria-label='linux'>
|
|
||||||
<Linux size={isMobile ? 18 : 32} />
|
|
||||||
</IconButton>
|
|
||||||
</Link>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
<Divider style={{marginBlock: '1em'}} />
|
|
||||||
<Typography gutterBottom style={{textAlign: 'center', fontWeight: 'bold'}}>
|
|
||||||
Rejoindre le groupe public
|
|
||||||
</Typography>
|
|
||||||
<Box style={{textAlign: 'center'}}>
|
|
||||||
<Image
|
|
||||||
src={QRCode}
|
|
||||||
width={200}
|
|
||||||
height={200}
|
|
||||||
placeholder='blur'
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
<Box style={{textAlign: 'center', marginBlock: 20}}>
|
|
||||||
<Button
|
|
||||||
variant='contained'
|
|
||||||
color='primary'
|
|
||||||
startIcon={<FileCopyIcon />}
|
|
||||||
onClick={handleCopyUrl}
|
|
||||||
>
|
|
||||||
Copier l’URL du groupe
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
{success && (
|
|
||||||
<Snackbar open={ouveSnack} autoHideDuration={3000} onClose={handleFemenSnack}>
|
|
||||||
<Alert severity='success' onClose={handleFemenSnack}>
|
|
||||||
<strong>{success}</strong>
|
|
||||||
</Alert>
|
|
||||||
</Snackbar>
|
|
||||||
)}
|
|
||||||
{error && (
|
|
||||||
<Snackbar open={ouveSnack} autoHideDuration={3000} onClose={handleFemenSnack}>
|
|
||||||
<Alert severity='error' onClose={handleFemenSnack}>
|
|
||||||
<strong>Une erreur s’est produite</strong> : <i>{error.message}</i>
|
|
||||||
</Alert>
|
|
||||||
</Snackbar>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
SesyonDialog.propTypes = {
|
|
||||||
ouve: PropTypes.bool.isRequired,
|
|
||||||
handleFemen: PropTypes.func.isRequired
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
import {useState} from 'react'
|
|
||||||
import {Box, Button, Typography} from '@material-ui/core'
|
|
||||||
import {Signal} from '@icons-pack/react-simple-icons'
|
|
||||||
|
|
||||||
import SignalDialog from './signal-dialog'
|
|
||||||
|
|
||||||
export default function JwennSignal() {
|
|
||||||
const [ouve, meteOuve] = useState(false)
|
|
||||||
|
|
||||||
const handleClickOuve = () => {
|
|
||||||
meteOuve(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFemen = () => {
|
|
||||||
meteOuve(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button style={{marginTop: 10}} variant='outlined' color='primary' onClick={handleClickOuve}>
|
|
||||||
<Box paddingTop={1}>
|
|
||||||
<Signal size={55} />
|
|
||||||
<Typography style={{fontWeight: 'bold'}} variant='h6' component='h1'>
|
|
||||||
Signal
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
</Button>
|
|
||||||
{ouve && (
|
|
||||||
<SignalDialog ouve={ouve} handleFemen={handleFemen} />
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
import Image from 'next/image'
|
|
||||||
import {useRouter} from 'next/router'
|
|
||||||
import PropTypes from 'prop-types'
|
|
||||||
import {withStyles} from '@material-ui/core/styles'
|
|
||||||
import {Box, Button, Dialog} from '@material-ui/core'
|
|
||||||
import MuiDialogTitle from '@material-ui/core/DialogTitle'
|
|
||||||
import MuiDialogContent from '@material-ui/core/DialogContent'
|
|
||||||
import IconButton from '@material-ui/core/IconButton'
|
|
||||||
import CloseIcon from '@material-ui/icons/Close'
|
|
||||||
import Typography from '@material-ui/core/Typography'
|
|
||||||
import {Signal} from '@icons-pack/react-simple-icons'
|
|
||||||
|
|
||||||
import QRCode from '../../public/signal-qr-code.jpg'
|
|
||||||
|
|
||||||
const signalGourpUrl = process.env.NEXT_PUBLIC_SIGNAL_URL || 'https://signal.org/fr/download/'
|
|
||||||
|
|
||||||
const styles = theme => ({
|
|
||||||
root: {
|
|
||||||
margin: 0,
|
|
||||||
padding: theme.spacing(2)
|
|
||||||
},
|
|
||||||
closeButton: {
|
|
||||||
position: 'absolute',
|
|
||||||
right: theme.spacing(1),
|
|
||||||
top: theme.spacing(1),
|
|
||||||
color: theme.palette.grey[500]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const DialogTitle = withStyles(styles)(props => {
|
|
||||||
const {children, classes, onClose, ...other} = props
|
|
||||||
return (
|
|
||||||
<MuiDialogTitle disableTypography className={classes.root} {...other}>
|
|
||||||
<Typography variant='h6'>{children}</Typography>
|
|
||||||
{onClose ? (
|
|
||||||
<IconButton aria-label='close' className={classes.closeButton} onClick={onClose}>
|
|
||||||
<CloseIcon />
|
|
||||||
</IconButton>
|
|
||||||
) : null}
|
|
||||||
</MuiDialogTitle>
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
const DialogContent = withStyles(theme => ({
|
|
||||||
root: {
|
|
||||||
padding: theme.spacing(2)
|
|
||||||
}
|
|
||||||
}))(MuiDialogContent)
|
|
||||||
|
|
||||||
export default function SignalDialog({ouve, handleFemen}) {
|
|
||||||
const router = useRouter()
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
router.push(signalGourpUrl)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Dialog aria-labelledby='customized-dialog-title' open={ouve} onClose={handleFemen}>
|
|
||||||
<DialogTitle style={{textAlign: 'center'}} id='customized-dialog-title' onClose={handleFemen}>
|
|
||||||
Groupe Signal
|
|
||||||
</DialogTitle>
|
|
||||||
<DialogContent dividers>
|
|
||||||
<Box style={{textAlign: 'center', marginBottom: 20}}>
|
|
||||||
<Button
|
|
||||||
variant='contained'
|
|
||||||
color='primary'
|
|
||||||
startIcon={<Signal />}
|
|
||||||
onClick={handleClick}
|
|
||||||
>
|
|
||||||
Rejoindre
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
<Box style={{textAlign: 'center'}}>
|
|
||||||
<Image
|
|
||||||
src={QRCode}
|
|
||||||
width={300}
|
|
||||||
height={300}
|
|
||||||
placeholder='blur'
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
SignalDialog.propTypes = {
|
|
||||||
ouve: PropTypes.bool.isRequired,
|
|
||||||
handleFemen: PropTypes.func.isRequired
|
|
||||||
}
|
|
||||||
+1
-11
@@ -1,7 +1,6 @@
|
|||||||
import {useState} from 'react'
|
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import {Box, Container, Grid, Typography, useMediaQuery} from '@material-ui/core'
|
import {Box, Container, Grid, Typography} from '@material-ui/core'
|
||||||
import {makeStyles} from '@material-ui/core/styles'
|
import {makeStyles} from '@material-ui/core/styles'
|
||||||
import GroupIcon from '@material-ui/icons/Group'
|
import GroupIcon from '@material-ui/icons/Group'
|
||||||
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
import MusicNoteIcon from '@material-ui/icons/MusicNote'
|
||||||
@@ -11,7 +10,6 @@ import TwitterIcon from '@material-ui/icons/Twitter'
|
|||||||
|
|
||||||
import KatKayLa from '../components/kat-kay-la'
|
import KatKayLa from '../components/kat-kay-la'
|
||||||
import HeadLayout from '../components/head-layout'
|
import HeadLayout from '../components/head-layout'
|
||||||
import Carousel from '../components/carousel'
|
|
||||||
import Footer from '../components/footer'
|
import Footer from '../components/footer'
|
||||||
import {jwennTeksKantite, jwennAwtisKantite} from '../lib/oki-api'
|
import {jwennTeksKantite, jwennAwtisKantite} from '../lib/oki-api'
|
||||||
import RezoMenu from '../components/rezo-menu'
|
import RezoMenu from '../components/rezo-menu'
|
||||||
@@ -66,15 +64,12 @@ const REZO = [
|
|||||||
|
|
||||||
export default function Home({kantiteAwtis, kantiteTeks}) {
|
export default function Home({kantiteAwtis, kantiteTeks}) {
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
const [handleOpen, setHandleOpen] = useState(false)
|
|
||||||
|
|
||||||
const kantite = [
|
const kantite = [
|
||||||
{id: 1, tit: 'Tèks', soutit: 'Texte', kantite: kantiteTeks, route: '/teks'},
|
{id: 1, tit: 'Tèks', soutit: 'Texte', kantite: kantiteTeks, route: '/teks'},
|
||||||
{id: 2, tit: 'Awtis', soutit: 'Artiste', kantite: kantiteAwtis, route: '/awtis?paj&paj=1'}
|
{id: 2, tit: 'Awtis', soutit: 'Artiste', kantite: kantiteAwtis, route: '/awtis?paj&paj=1'}
|
||||||
]
|
]
|
||||||
|
|
||||||
const matches = useMediaQuery('(max-width:600px)')
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HeadLayout tab={0}>
|
<HeadLayout tab={0}>
|
||||||
<div style={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
|
<div style={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
|
||||||
@@ -100,11 +95,6 @@ export default function Home({kantiteAwtis, kantiteTeks}) {
|
|||||||
{kantite.map(k => <KatKayLa key={k.id} tit={k.tit} soutit={k.soutit} kantite={k.kantite} route={k.route} />)}
|
{kantite.map(k => <KatKayLa key={k.id} tit={k.tit} soutit={k.soutit} kantite={k.kantite} route={k.route} />)}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Container>
|
</Container>
|
||||||
<Carousel
|
|
||||||
isMobile={matches}
|
|
||||||
handleOpen={handleOpen}
|
|
||||||
setHandleOpen={setHandleOpen}
|
|
||||||
/>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</HeadLayout>
|
</HeadLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user