2024-02-28 21:49:44 +05:00
|
|
|
import { Box, Button, Typography, useTheme } from '@mui/material'
|
|
|
|
import { useEffect } from 'react'
|
|
|
|
import { useSelector } from 'react-redux'
|
|
|
|
import { useLocation, useNavigate } from 'react-router-dom'
|
|
|
|
import { appPublicRoutes } from '../../routes'
|
|
|
|
import { State } from '../../store/rootReducer'
|
|
|
|
import { saveVisitedLink } from '../../utils'
|
|
|
|
import styles from './style.module.scss'
|
|
|
|
|
|
|
|
const bodyBackgroundColor = document.body.style.backgroundColor
|
|
|
|
|
|
|
|
export const LandingPage = () => {
|
|
|
|
const authState = useSelector((state: State) => state.auth)
|
|
|
|
const navigate = useNavigate()
|
|
|
|
const location = useLocation()
|
|
|
|
|
|
|
|
const theme = useTheme()
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
saveVisitedLink(location.pathname, location.search)
|
|
|
|
}, [location])
|
|
|
|
|
|
|
|
const onSignInClick = async () => {
|
|
|
|
navigate(appPublicRoutes.login)
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className={styles.landingPage}>
|
|
|
|
<Box
|
|
|
|
mt={10}
|
|
|
|
sx={{
|
|
|
|
width: '100%',
|
|
|
|
display: 'flex',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'center',
|
|
|
|
flexDirection: { xs: 'column', md: 'row' }
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
mr: {
|
|
|
|
xs: 0,
|
|
|
|
md: 5
|
|
|
|
},
|
|
|
|
mb: {
|
|
|
|
xs: 5,
|
|
|
|
md: 0
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
|
|
|
fontWeight: 'bold',
|
|
|
|
marginBottom: 5,
|
|
|
|
color: bodyBackgroundColor
|
|
|
|
? theme.palette.getContrastText(bodyBackgroundColor)
|
|
|
|
: ''
|
|
|
|
}}
|
2024-05-15 11:50:21 +03:00
|
|
|
variant="h4"
|
2024-02-28 21:49:44 +05:00
|
|
|
>
|
2024-05-15 18:48:28 +01:00
|
|
|
What is SIGit?
|
2024-02-28 21:49:44 +05:00
|
|
|
</Typography>
|
|
|
|
<Typography
|
|
|
|
sx={{
|
|
|
|
color: bodyBackgroundColor
|
|
|
|
? theme.palette.getContrastText(bodyBackgroundColor)
|
|
|
|
: ''
|
|
|
|
}}
|
2024-05-15 11:50:21 +03:00
|
|
|
variant="body1"
|
2024-02-28 21:49:44 +05:00
|
|
|
>
|
2024-05-15 18:48:28 +01:00
|
|
|
SIGit is an open-source and self-hostable solution for secure
|
|
|
|
document signing and verification. Code is MIT licenced and
|
2024-05-15 19:28:27 +01:00
|
|
|
available at{' '}
|
2024-02-28 21:49:44 +05:00
|
|
|
<a
|
2024-05-15 11:50:21 +03:00
|
|
|
className="bold-link"
|
|
|
|
target="_blank"
|
2024-05-15 18:48:28 +01:00
|
|
|
href="https://git.sigit.io/sig/it"
|
2024-02-28 21:49:44 +05:00
|
|
|
>
|
2024-05-15 19:28:27 +01:00
|
|
|
https://git.sigit.io/sig/it
|
2024-02-28 21:49:44 +05:00
|
|
|
</a>
|
|
|
|
.
|
|
|
|
<br />
|
|
|
|
<br />
|
2024-05-15 19:28:27 +01:00
|
|
|
SIGit lets you Create, Sign and Verify signature packs from any
|
2024-05-15 18:48:28 +01:00
|
|
|
device with a browser.
|
2024-02-28 21:49:44 +05:00
|
|
|
<br />
|
|
|
|
<br />
|
2024-05-15 19:28:27 +01:00
|
|
|
Unlike other solutions, SIGit is totally private - files are
|
|
|
|
encrypted locally, and valid packs can only be exported by named
|
|
|
|
recipients.
|
2024-02-28 21:49:44 +05:00
|
|
|
</Typography>
|
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
{!authState?.loggedIn && (
|
|
|
|
<div className={styles.loginBottomBar}>
|
|
|
|
<Button
|
|
|
|
className={styles.loginBtn}
|
2024-05-15 11:50:21 +03:00
|
|
|
variant="contained"
|
2024-02-28 21:49:44 +05:00
|
|
|
onClick={onSignInClick}
|
|
|
|
>
|
|
|
|
GET STARTED
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|