Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 18 additions & 40 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emoji-mart/data": "^1.1.2",
"@emoji-mart/react": "^1.1.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.5.1",
"emoji-mart": "^5.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3",
"react-scripts": "^5.0.1",
"react-router-dom": "^6.16.0",
"react-scripts": "5.0.1",
"react-use-websocket": "^4.5.0",
"web-vitals": "^2.1.4"
},
Expand Down
191 changes: 4 additions & 187 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -436,200 +436,17 @@ header {
@keyframes s4{
100%{transform: rotate(1turn)}
}


/* this is the video caller */
.call-img svg{
width: 30px;
}



/* Notes */
/* Code for the callerPage Side */


.caller-page {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
overflow:auto;
height: calc(100vh);
padding: 1%;
}


.top{
display: flex;
justify-content: space-between;
flex-direction: row;
align-items: center;
width:100%;
}


.top img{
width: 30px;
}

.top--1{
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 1px;
}
.top--1 svg{
width: 30px;
height: 100%;
padding: 3px;
}

.top--2 {
width: 30px;
height: 100%;
}
/* the h1 of the timer */

.timer {
font-size: 15px;
}


/* the caller or middle section */

.caller--name{
display: flex;

}

.caller--name h1{
color: black;
font-size: 35px;
}



.end{
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
border-top: 1px solid black;
padding: 2%;
}

.end svg{
width: 40px;
align-items: end;
height: 100%;
border: 2px solid black;
padding: 5px;
border-radius: 15px;
background-color: transparent;
/* animation: hoverIcon 0.5s ease-in; */
}

.end svg:hover{
background-color: rgb(221, 221, 193);
}


.dark{
background-color: rgb(56, 53, 53);
}

.dark .caller--name h1{
color: white;
}

.dark .end svg{
fill: white;
border: 2px solid white;
}


.dark .end{
border-top: 1px solid white;
}

.dark .timer {
color: white;
}
.dark .top--2 {
fill: white;
}


.dark .chats-container{
background-color: rgb(56, 53, 53);
}
.dark .chats-container h1 {
color: white;
}

.dark .chats-container p{
color: black;
}

.dark .chats-container .welcome{
color: white;
}
.dark .call-img svg{
fill:white
}
.dark .messages-container{
background-color: rgb(56, 53, 53);
}

.dark .top--1 svg{
fill: whitesmoke;
}


.dark .end svg:hover{
background-color: rgb(88, 86, 86);
}



/* Dealing wwith responsiveness */


/* @media (max-width: 760px) {
.chats-container{
width: 0%;
}
.messages-container{
width: 100%;
}

} */



@media (max-width: 900px) {
.chats-container {
width: 0px;
width: 300px;
}
}

@media (max-width: 760px) {
/* .responsive {
.responsive {
display: none;
} */
}
.chats-container {
width: 0px;
width: 100%;
}

}










19 changes: 5 additions & 14 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,19 @@ import ProtectedRoute from './components/auth/ProtectedRoute';
import DefaultChat from './components/core/DefaultChat';
import Messages from './components/core/Messages';
import MessageDetail from './components/core/MessageDetail';
import CallerPage from './components/core/callerPage';
import { useState } from 'react';




function App() {
const [changeMode, setIsChangeMode] = useState()
const toggleMode = () =>{
setIsChangeMode(prevMode => !prevMode)
};


return (
<AuthProvider>
<Routes>
<Route path="/signup" element={<Signup />} />
<Route path="/login" element={<Login />} />
<Route path="/" element={<ProtectedRoute><Messages changeMode={changeMode}/></ProtectedRoute>}>
<Route index element={<DefaultChat />} />
<Route path=":username" element={<ProtectedRoute><MessageDetail changeMode={changeMode} /></ProtectedRoute>} />
<Route path="/callerpage" element={<CallerPage changeMode={changeMode} toggleMode={toggleMode} />}/>
</Route>
<Route path="/" element={<ProtectedRoute><Messages /></ProtectedRoute>}>
<Route index element={<DefaultChat />} />
<Route path=":username" element={<ProtectedRoute><MessageDetail /></ProtectedRoute>} />
</Route>
</Routes>
</AuthProvider>
);
Expand Down
Loading