Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
My SU
frontend
Commits
d423dce9
Commit
d423dce9
authored
Nov 08, 2020
by
TJHeeringa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated public routes
parent
f5b80e76
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
32 deletions
+85
-32
src/App/Components/Lists/Drawer/Drawer.js
src/App/Components/Lists/Drawer/Drawer.js
+2
-2
src/App/Components/PageLayout/Burger.js
src/App/Components/PageLayout/Burger.js
+32
-0
src/App/Components/PageLayout/PageLayout.js
src/App/Components/PageLayout/PageLayout.js
+34
-24
src/App/Contexts/Locale.js
src/App/Contexts/Locale.js
+2
-2
src/App/Contexts/PageLayout.js
src/App/Contexts/PageLayout.js
+2
-1
src/App/Pages/Profile/SharedProfile.js
src/App/Pages/Profile/SharedProfile.js
+11
-2
src/App/Pages/Public/FAQ.js
src/App/Pages/Public/FAQ.js
+1
-1
src/App/Pages/Search/Associations.js
src/App/Pages/Search/Associations.js
+1
-0
No files found.
src/App/Components/Lists/Drawer/Drawer.js
View file @
d423dce9
import
List
from
"
@material-ui/core/List
"
;
import
ListSubheader
from
"
@material-ui/core/ListSubheader
"
;
import
{
makeStyles
,
useTheme
}
from
"
@material-ui/core/styles
"
;
import
PropTypes
from
"
prop-types
"
;
import
React
from
"
react
"
;
import
Link
from
"
./Link
"
;
import
DropDown
from
"
./DropDown
"
;
import
PropTypes
from
"
prop-types
"
;
import
Link
from
"
./Link
"
;
const
useStyles
=
makeStyles
(
theme
=>
({
root
:
{
...
...
src/App/Components/PageLayout/Burger.js
0 → 100644
View file @
d423dce9
import
makeStyles
from
"
@material-ui/core/styles/makeStyles
"
;
import
PropTypes
from
"
prop-types
"
;
import
IconButton
from
"
@material-ui/core/IconButton
"
;
import
clsx
from
"
clsx
"
;
import
MenuIcon
from
"
@material-ui/icons/Menu
"
;
import
MenuOpenIcon
from
"
@material-ui/icons/MenuOpen
"
;
import
React
from
"
react
"
;
const
useStyles
=
makeStyles
(
theme
=>
({
}));
const
Burger
=
({
open
,
onClick
})
=>
{
const
classes
=
useStyles
();
return
(
<
IconButton
color
=
{
"
inherit
"
}
onClick
=
{
onClick
}
edge
=
{
"
start
"
}
>
{
open
?
<
MenuOpenIcon
fontSize
=
{
"
large
"
}
/> : <MenuIcon fontSize={"large"}/
>
}
<
/IconButton
>
);
};
Burger
.
propTypes
=
{
open
:
PropTypes
.
bool
.
isRequired
,
onClick
:
PropTypes
.
func
.
isRequired
};
export
default
Burger
;
\ No newline at end of file
src/App/Components/PageLayout/PageLayout.js
View file @
d423dce9
...
...
@@ -8,31 +8,38 @@ import makeStyles from "@material-ui/core/styles/makeStyles";
import
useTheme
from
"
@material-ui/core/styles/useTheme
"
;
import
Toolbar
from
"
@material-ui/core/Toolbar
"
;
import
ChevronLeftIcon
from
"
@material-ui/icons/ChevronLeft
"
;
import
Menu
Icon
from
"
@material-ui/icons/Menu
"
;
import
Menu
OpenIcon
from
"
@material-ui/icons/MenuOpen
"
;
import
MoreVertIcon
from
"
@material-ui/icons/MoreVert
"
;
import
{
AlertHandler
}
from
"
App/Components/AlertHandler
"
;
import
clsx
from
"
clsx
"
;
import
PropTypes
from
"
prop-types
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
React
,
{
useEffect
,
useState
}
from
"
react
"
;
import
{
SizeMe
}
from
"
react-sizeme
"
;
import
useMediaQuery
from
"
@material-ui/core/useMediaQuery
"
;
import
{
useAlertHandler
}
from
"
../../Contexts/AlertHandler
"
;
import
{
useAuth
}
from
"
../../Contexts/Authentication
"
;
import
LocaleSwitch
from
"
../Forms/LocaleSwitch
"
;
import
ThemeSwitch
from
"
../Forms/ThemeSwitch
"
;
import
Burger
from
"
./Burger
"
;
import
AvatarMenu
from
"
./Menu/AvatarMenu
"
;
import
NotificationMenu
from
"
./Menu/NotificationMenu
"
;
import
LocaleSwitch
from
"
../Forms/LocaleSwitch
"
;
const
drawerWidth
=
240
;
const
styles
=
theme
=>
({
root
:
{
display
:
"
flex
"
,
// overflow: "auto",
// msOverflowStyle: "none",
// scrollbarWidth: "none"
},
appBar
:
{
transition
:
theme
.
transitions
.
create
([
"
margin
"
,
"
width
"
],
{
easing
:
theme
.
transitions
.
easing
.
sharp
,
duration
:
theme
.
transitions
.
duration
.
leavingScreen
,
}),
zIndex
:
theme
.
zIndex
.
drawer
+
1
},
appBarShift
:
{
width
:
`
calc(100% -
${
drawerWidth
}
px)
`
,
...
...
@@ -61,6 +68,7 @@ const styles = theme => ({
padding
:
theme
.
spacing
(
0
,
1
),
...
theme
.
mixins
.
toolbar
,
justifyContent
:
"
flex-end
"
,
height
:
90
},
content
:
{
width
:
`
calc(100% -
${
drawerWidth
}
px)
`
,
...
...
@@ -104,31 +112,32 @@ const useStyles = makeStyles(styles);
const
PageLayout
=
({
Header
,
Sidebar
,
children
})
=>
{
const
theme
=
useTheme
();
const
classes
=
useStyles
(
theme
);
const
{
authenticated
}
=
useAuth
();
const
alerthandler
=
useAlertHandler
();
const
[
openDrawer
,
setOpenDrawer
]
=
useState
(
true
);
const
mobile
=
useMediaQuery
(
theme
.
breakpoints
.
down
(
"
xs
"
));
const
[
openDrawer
,
setOpenDrawer
]
=
useState
(
false
);
const
handleDrawerOpen
=
()
=>
{
setOpenDrawer
(
true
);};
const
handleDrawerClose
=
()
=>
{
setOpenDrawer
(
false
);};
const
handleDrawerClose
=
()
=>
setOpenDrawer
(
false
);
const
toggleDrawer
=
()
=>
setOpenDrawer
(
!
openDrawer
);
// Open the sidebar when logging in, close it when logging out.
// Only on Desktop; on mobile this behavior is disruptive.
useEffect
(()
=>
{
if
(
!
mobile
){
setOpenDrawer
(
authenticated
);
}
},
[
authenticated
]);
return
(
<
div
className
=
{
classes
.
root
}
>
<
nav
className
=
{
classes
.
drawer
}
>
<
AppBar
position
=
{
"
fixed
"
}
className
=
{
clsx
(
classes
.
appBar
,
{
[
classes
.
appBarShift
]:
openDrawer
,
})}
className
=
{
classes
.
appBar
}
>
<
Toolbar
>
<
IconButton
color
=
{
"
inherit
"
}
onClick
=
{
handleDrawerOpen
}
edge
=
{
"
start
"
}
className
=
{
clsx
(
classes
.
menuButton
,
openDrawer
&&
classes
.
hide
)}
>
<
MenuIcon
/>
<
/IconButton
>
<
Burger
open
=
{
openDrawer
}
onClick
=
{
toggleDrawer
}
/
>
<
SizeMe
>
{
({
size
})
=>
<
div
style
=
{{
width
:
"
100%
"
}}
>
<
div
className
=
{
classes
.
headerBar
}
>
...
...
@@ -136,7 +145,7 @@ const PageLayout = ({ Header, Sidebar, children}) => {
<
Header
size
=
{
size
}
/
>
<
/div
>
<
div
className
=
{
classes
.
navigation
}
>
{
/*<NotificationMenu/>*/
}
{
/*<NotificationMenu/>*/
}
<
AvatarMenu
>
<
MoreVertIcon
fontSize
=
{
"
large
"
}
/
>
<
/AvatarMenu
>
...
...
@@ -160,7 +169,12 @@ const PageLayout = ({ Header, Sidebar, children}) => {
}}
>
<
div
className
=
{
classes
.
drawerHeader
}
>
<
IconButton
onClick
=
{
handleDrawerClose
}
>
<
IconButton
color
=
{
"
inherit
"
}
onClick
=
{
handleDrawerClose
}
edge
=
{
"
start
"
}
className
=
{
clsx
(
classes
.
menuButton
,
openDrawer
||
classes
.
hide
)}
>
<
ChevronLeftIcon
/>
<
/IconButton
>
<
/div
>
...
...
@@ -176,11 +190,7 @@ const PageLayout = ({ Header, Sidebar, children}) => {
variant
=
{
"
persistent
"
}
open
=
{
openDrawer
}
>
<
div
className
=
{
classes
.
drawerHeader
}
>
<
IconButton
onClick
=
{
handleDrawerClose
}
>
<
ChevronLeftIcon
/>
<
/IconButton
>
<
/div
>
<
div
className
=
{
classes
.
drawerHeader
}
/
>
<
Divider
/>
<
Sidebar
/>
<
/Drawer
>
...
...
src/App/Contexts/Locale.js
View file @
d423dce9
...
...
@@ -3,7 +3,7 @@ import { MuiPickersUtilsProvider } from "@material-ui/pickers";
import
moment
from
"
moment
"
;
import
PropTypes
from
"
prop-types
"
;
import
React
,
{
createContext
,
useContext
,
useState
}
from
"
react
"
;
import
"
moment/locale/
fr
"
;
import
"
moment/locale/
nl
"
;
const
LocaleContext
=
createContext
({
locale
:
"
en
"
,
...
...
@@ -15,7 +15,7 @@ export function useLocale() {
}
const
LocaleProvider
=
({
children
})
=>
{
const
[
locale
,
setLocale
]
=
useState
(
"
fr
"
);
const
[
locale
,
setLocale
]
=
useState
(
"
en
"
);
moment
.
locale
(
locale
);
console
.
log
(
locale
);
...
...
src/App/Contexts/PageLayout.js
View file @
d423dce9
...
...
@@ -7,6 +7,7 @@ import AssociationHeader from "../Components/PageLayout/Header/Header";
import
AssociationBoardSideBar
from
"
../Components/PageLayout/SideBar/AssociationBoardSideBar
"
;
import
AssociationMemberSideBar
from
"
../Components/PageLayout/SideBar/AssociationMemberSideBar
"
;
import
PublicSideBar
from
"
../Components/PageLayout/SideBar/PublicSideBar
"
;
import
EmptySideBar
from
"
../Components/PageLayout/SideBar/EmptySideBar
"
;
const
PageLayoutContext
=
createContext
({
...
...
@@ -38,7 +39,7 @@ const PageLayoutProvider = ({ children }) => {
}
else
if
(
location
.
pathname
.
includes
(
"
/boardmember
"
))
{
sidebar
=
AssociationBoardSideBar
;
}
else
{
sidebar
=
Public
SideBar
;
sidebar
=
Empty
SideBar
;
}
const
contextValue
=
{
...
...
src/App/Pages/Profile/SharedProfile.js
View file @
d423dce9
import
Button
from
"
@material-ui/core/Button
"
;
import
Container
from
"
@material-ui/core/Container
"
;
import
makeStyles
from
"
@material-ui/core/styles/makeStyles
"
;
import
useTheme
from
"
@material-ui/core/styles/useTheme
"
;
import
Typography
from
"
@material-ui/core/Typography
"
;
import
PropTypes
from
"
prop-types
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
Button
}
from
"
reactstrap
"
;
import
{
Profile
}
from
"
../../Components/InfoForms/Profile
"
;
import
Block
from
"
../../Components/PageLayout/Content/Block
"
;
...
...
@@ -14,6 +14,9 @@ const useStyles = makeStyles(theme=>({
header
:
{
display
:
"
flex
"
,
justifyContent
:
"
space-between
"
},
button
:
{
float
:
"
right
"
}
}));
...
...
@@ -37,7 +40,13 @@ const SharedProfile = ({ preferred_profile }) => {
<
/a
>
}
&
nbsp
;
<
Button
style
=
{{
"
float
"
:
"
right
"
}}
color
=
{
"
primary
"
}
onClick
=
{()
=>
changeFormType
()}
>
{
formType
===
"
info
"
?
"
Edit
"
:
"
View
"
}
<
/Button
>
<
Button
color
=
{
"
primary
"
}
variant
=
{
"
contained
"
}
onClick
=
{
changeFormType
}
>
{
formType
===
"
info
"
?
"
Edit
"
:
"
View
"
}
<
/Button
>
<
/div
>
<
/div
>
<
hr
className
=
{
"
box-title-separator
"
}
/
>
...
...
src/App/Pages/Public/FAQ.js
View file @
d423dce9
...
...
@@ -50,7 +50,7 @@ const FAQ = (props) => {
Please
contact
us
in
the
discord
or
send
an
email
to
join
@
su
.
utwente
.
nl
to
ask
what
you
can
do
to
help
.
<
br
/><
br
/>
The
code
for
the
project
is
located
at
https
:
//git.snt.utwente.nl/sun. The repository `sun` has the
code
for
the
backend
and
the
repository
`
frontend
`
has
the
code
for
the
frontend
.
Visit
the
wikis
for
the
respective
repositories
to
learn
more
.
...
...
src/App/Pages/Search/Associations.js
View file @
d423dce9
...
...
@@ -54,6 +54,7 @@ export const Associations = (props) => {
<
Block
>
<
Typography
variant
=
{
"
h5
"
}
>
Associations
<
/Typography
>
<
Divider
/>
<
br
/>
<
SearchBar
placeholder
=
{
"
Search
"
}
value
=
{
searchTerm
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment