Skip to content

Commit

Permalink
ADD privacy policy
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Sep 10, 2022
1 parent 7a29f42 commit c449351
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 13 deletions.
24 changes: 24 additions & 0 deletions web/src/components/shared/PrivacyPolicy/PrivacyPolicy.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

export default function PrivacyPolicy() {
return (
<Box sx={{m: 2}}>
<Typography variant={'body2'}>
By using this application, you are agreeing to be bound by the terms and conditions of this agreement.
If you do not agree to the terms of this agreement, do not use the application. This agreement is a legal
document between you and the company
and it governs your use of the application made available to you by the company. This agreement is between you
and the company only and not with the application store. Therefore, the company is solely
responsible for the application and its content. Although the application store is not a party to this
agreement, it has the right to enforce it against you as a third party
beneficiary relating to your use of the application. Since the application can be
accessed and used by other users via, for example, family sharing/family group or volume purchasing, the use
of the application by those users is expressly subject to this agreement. The application
is licensed, not sold to you by the company for use strictly in accordance with the
terms of this agreement.
</Typography>
</Box>
);
}
36 changes: 36 additions & 0 deletions web/src/components/shared/PrivacyPolicy/PrivacyPolicyModal.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import Button from '@mui/material/Button';
import PrivacyPolicy from './PrivacyPolicy';
import VisibilityIcon from '@mui/icons-material/Visibility';

export default function PrivacyPolicyModal() {
const [open, setOpen] = React.useState(false);

return (
<React.Fragment>
<Button
variant={'contained'}
color={'primary'}
onClick={() => setOpen(true)}
startIcon={<VisibilityIcon/>}
>
View
</Button>
<Dialog open={open} onClose={() => setOpen(false)}>
<DialogTitle>
Privacy Policy
</DialogTitle>
<DialogContent>
<PrivacyPolicy/>
</DialogContent>
<DialogActions>
<Button variant={'contained'} onClick={() => setOpen(false)}>Close</Button>
</DialogActions>
</Dialog>
</React.Fragment>
);
}
6 changes: 6 additions & 0 deletions web/src/navconfig.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Blog from './pages/core/public/Blog';
import Visuals from './pages/core/public/Visuals/Visuals';
import Lectures from './pages/core/public/Lectures/Lectures';
import Playgrounds from './pages/core/public/Playgrounds/Playgrounds';
import PrivacyPolicy from './pages/core/public/PrivacyPolicy';

import Assignment from './pages/core/public/Assignment/Assignment';
import Course from './pages/core/public/Course/Course';
Expand Down Expand Up @@ -269,6 +270,11 @@ export const not_shown_nav = [
path: '/admin/assignment/groups/:assignmentId',
Page: AdminAssignmentGroups,
},
{
id: '',
path: '/privacy-policy',
Page: PrivacyPolicy,
},
{
id: '',
path: '/v',
Expand Down
13 changes: 0 additions & 13 deletions web/src/pages/core/public/About.jsx

This file was deleted.

23 changes: 23 additions & 0 deletions web/src/pages/core/public/PrivacyPolicy.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import Box from '@mui/material/Box';
import useTheme from '@mui/material/styles/useTheme';

import StandardLayout from '../../../components/shared/Layouts/StandardLayout';
import PrivacyPolicyText from '../../../components/shared/PrivacyPolicy/PrivacyPolicy';
import SectionHeader from '../../../components/shared/SectionHeader/SectionHeader';

export default function PrivacyPolicy() {
const theme = useTheme();
return (
<StandardLayout>
<SectionHeader isPage title='Anubis LMS Privacy Policy'/>
<Box sx={{
width: '100%',
borderTop: `1px solid ${theme.palette.dark.blue['200']}`,
marginTop: 2,
height: '1px',
}}/>
<PrivacyPolicyText/>
</StandardLayout>
);
}
9 changes: 9 additions & 0 deletions web/src/pages/core/public/Profile/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import StandardLayout from '../../../../components/shared/Layouts/StandardLayout
import SectionHeader from '../../../../components/shared/SectionHeader/SectionHeader.jsx';
import Divider from '../../../../components/shared/Divider/Divider';
import DeletePvc from '../../../../components/core/Profile/DeletePvc';
import PrivacyPolicyModal from '../../../../components/shared/PrivacyPolicy/PrivacyPolicyModal';

const Profile = () => {
const [user, setUser] = useState(null);
Expand Down Expand Up @@ -131,6 +132,14 @@ const Profile = () => {
<DeletePvc/>
</Box>
</Box>
<Box className={classes.fieldsContainer}>
<Box className={classes.githubContainer}>
<Typography className={classes.githubText}>
Privacy Policy
</Typography>
<PrivacyPolicyModal/>
</Box>
</Box>
</StandardLayout>
);
};
Expand Down

0 comments on commit c449351

Please sign in to comment.