diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index dee9ea26..56762422 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -10,6 +10,8 @@ import { Circle, Add, Logout, Clear } from "@mui/icons-material"; import MeetingRoomIcon from '@mui/icons-material/MeetingRoom'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { AuthContext } from '../../context/auth'; +import { GenericModal } from '../atoms/GenericModal'; +import TextField from '@mui/material/TextField'; interface NavBarProps { newRecording: () => void; @@ -22,6 +24,9 @@ export const NavBar: React.FC = ({ newRecording, recordingName, isR const { notify, browserId, setBrowserId, recordingLength } = useGlobalInfoStore(); const { state, dispatch } = useContext(AuthContext); const { user } = state; + const [isModalOpen, setModalOpen] = useState(false); + const [url, setUrl] = useState(''); + const navigate = useNavigate(); const logout = async () => { @@ -48,9 +53,14 @@ export const NavBar: React.FC = ({ newRecording, recordingName, isR setBrowserId(null); await stopRecording(browserId); } + setModalOpen(true); + }; + + const startRecording = () => { + setModalOpen(false); newRecording(); - notify('info', 'New Recording started'); - } + notify('info', 'New Recording started for ' + url); + }; return ( @@ -133,6 +143,27 @@ export const NavBar: React.FC = ({ newRecording, recordingName, isR : null } + setModalOpen(false)}> +
+

Enter URL

+ setUrl(e.target.value)} + style={{ marginBottom: '20px' }} + /> + +
+
) : "" }