Skip to content

Commit

Permalink
Merge pull request #21 from unb-mds/frontend-rewrite
Browse files Browse the repository at this point in the history
Frontend rewrite
  • Loading branch information
RA-Salles authored Aug 16, 2024
2 parents a46ec86 + 0939bc2 commit 0280890
Show file tree
Hide file tree
Showing 13 changed files with 641 additions and 674 deletions.
16 changes: 16 additions & 0 deletions docs/basic/loginsystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"Written by bcL0c, whose login planning and execution will undoubtedly, somehow, erase all the database data"

### What is this document

This document attempts to design how the information should flow along the app and be
delivered to the user so we may perform a login operation and, therefore, grant privileges
based on this login.
Requirements for this system is as follows:
1. The user (or client) should be able to send an id and password
2. The server should be able to receive and treat this information
3.

### 1. Info passed client-server
This should be done via POST operation, in which the user attempts to send info.
After sending the post and we receive it, a query must be performed so we know who
is trying to login
5 changes: 3 additions & 2 deletions docs/msgSystem/basicdesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@
### Constraints 3 & 4: User knowledge
1. Reasoning
This is a must. The user would find great benefits to knowing when and who received his message, as
well as who the hell is sending him messages, specially considering this is for a renting site.
well as who the hell is sending him messages, specially considering this system is currently being designed for a renting site.

2. Basic Design
This should be as simple as setting the ownership of conversations and attributes for the entities. One
of the most annoying things of any kind of system is when a non-critical information is being stored,
is relevant to the user and the setup refuses to display it without some kind of roundabout esoteric route.
is relevant to the user and the setup refuses to display it without some kind of roundabout esoteric route and configuration.
Whenever a user sends a message, the system must know the receiver, time, owner and content. This theoretically should allow for even a binary to be sent without major stress, as js already sends



Expand Down
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ function App() {
<div className="App">
<Router>
<Routes>
<Route path='*' element={<NotFound />} />
<Route path='*' element={<NotFound />} /> { /*equivalente a -> app.get()*/}
<Route path='/' element={<Home/>} />
<Route path='/cadastro' element={<Cadastro/>} />
<Route path='/login' element={<Login />} />
<Route path='/perfil' element={<Perfil />} />
<Route path='/republica' element={<Republica />} />
{ /*<Route path='/republica/*' element={<Republica id="checkurl"/>}>*/}
</Routes>
</Router>

</div>
);
}
Expand Down
64 changes: 40 additions & 24 deletions src/components/pages/cadastro.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
import React from 'react';
import './styles/cadastro.css'
//import './styles/cadastro.css'

class PlaceholderLogo extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="ladoEsquerdo">
<div className="box">
<a href="login">
<svg
fill="#000000"
version="1.1"
id="Capa_1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
width="30px"
height="30px"
viewBox="0 0 299.021 299.021"
xmlSpace="preserve"
>
<g>
<g>
<path
d="M292.866,254.432c-2.288,0-4.443-1.285-5.5-3.399c-0.354-0.684-28.541-52.949-146.169-54.727v51.977
c0,2.342-1.333,4.48-3.432,5.513c-2.096,1.033-4.594,0.793-6.461-0.63L2.417,154.392C0.898,153.227,0,151.425,0,149.516
c0-1.919,0.898-3.72,2.417-4.888l128.893-98.77c1.87-1.426,4.365-1.667,6.461-0.639c2.099,1.026,3.432,3.173,3.432,5.509v54.776
c3.111-0.198,7.164-0.37,11.947-0.37c43.861,0,145.871,13.952,145.871,143.136c0,2.858-1.964,5.344-4.75,5.993 C293.802,254.384,293.34,254.432,292.866,254.432z"
/>
</g>
</g>
</svg>
</a>
</div>
</div>
)
}
}

class cadastro extends React.Component{
constructor(props) {
Expand All @@ -19,29 +57,7 @@ class cadastro extends React.Component{
href="https://fonts.googleapis.com/css2?family=Dancing+Script:[email protected]&display=swap"
rel="stylesheet"
/>
<div className="ladoEsquerdo">
<div className="box">
<a href="login.html">
<svg
fill="#000000"
version="1.1"
id="Capa_1"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
width="30px"
height="30px"
viewBox="0 0 299.021 299.021"
xmlSpace="preserve"
>
<g>
<g>
<path d="M292.866,254.432c-2.288,0-4.443-1.285-5.5-3.399c-0.354-0.684-28.541-52.949-146.169-54.727v51.977 c0,2.342-1.333,4.48-3.432,5.513c-2.096,1.033-4.594,0.793-6.461-0.63L2.417,154.392C0.898,153.227,0,151.425,0,149.516 c0-1.919,0.898-3.72,2.417-4.888l128.893-98.77c1.87-1.426,4.365-1.667,6.461-0.639c2.099,1.026,3.432,3.173,3.432,5.509v54.776 c3.111-0.198,7.164-0.37,11.947-0.37c43.861,0,145.871,13.952,145.871,143.136c0,2.858-1.964,5.344-4.75,5.993 C293.802,254.384,293.34,254.432,292.866,254.432z" />
</g>
</g>
</svg>
</a>
</div>
</div>
<PlaceholderLogo/>
<div className="ladoDireito">
<div className="content">
<div className="textos">
Expand Down
Loading

0 comments on commit 0280890

Please sign in to comment.