diff --git a/web/src/App.tsx b/web/src/App.tsx index 1f13e31..f905708 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -8,6 +8,7 @@ import Header from './components/header' import Home from './components/home' import Drive from './containers/Drive' import Studio from './containers/Studio' +import Settings from './containers/Settings' import { AppContext } from './context/appContext' @@ -46,6 +47,9 @@ function App() { + + + diff --git a/web/src/components/dialogTitle.tsx b/web/src/components/dialogTitle.tsx new file mode 100644 index 0000000..8c78033 --- /dev/null +++ b/web/src/components/dialogTitle.tsx @@ -0,0 +1,35 @@ +import React, { Dispatch, SetStateAction } from 'react' + +import DialogTitle from '@mui/material/DialogTitle' +import IconButton from '@mui/material/IconButton' +import CloseIcon from '@mui/icons-material/Close' + +export interface DialogTitleProps { + id: string + children?: React.ReactNode + onClose: Dispatch> +} + +export const BootstrapDialogTitle = (props: DialogTitleProps) => { + const { children, onClose, ...other } = props + + return ( + + {children} + {onClose ? ( + onClose(false)} + sx={{ + position: 'absolute', + right: 8, + top: 8, + color: (theme) => theme.palette.grey[500] + }} + > + + + ) : null} + + ) +} diff --git a/web/src/components/header.tsx b/web/src/components/header.tsx index c499ae3..82b01ed 100644 --- a/web/src/components/header.tsx +++ b/web/src/components/header.tsx @@ -1,4 +1,4 @@ -import React, { useState, useContext } from 'react' +import React, { useState, useEffect, useContext } from 'react' import { Link, useHistory, useLocation } from 'react-router-dom' import { @@ -11,6 +11,7 @@ import { MenuItem } from '@mui/material' import OpenInNewIcon from '@mui/icons-material/OpenInNew' +import SettingsIcon from '@mui/icons-material/Settings' import Username from './username' import { AppContext } from '../context/appContext' @@ -29,6 +30,10 @@ const Header = (props: any) => { (EventTarget & HTMLButtonElement) | null >(null) + useEffect(() => { + setTabValue(pathname) + }, [pathname]) + const handleMenu = ( event: React.MouseEvent ) => { @@ -132,6 +137,17 @@ const Header = (props: any) => { open={!!anchorEl} onClose={handleClose} > + + + + + + + ) +} diff --git a/web/src/index.css b/web/src/index.css index 6f5fcc7..34d605c 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -18,3 +18,10 @@ code { flex-direction: column; align-items: center; } + +.permissions-page { + display: flex; + flex-direction: column; + padding: '5px 10px'; + margin-top: '10px'; +}