瀏覽代碼

forgot password

amenpunk 3 年之前
父節點
當前提交
383dd85f15
共有 5 個文件被更改,包括 43 次插入7 次删除
  1. 9 0
      src/App.css
  2. 2 0
      src/Components/Routes.js
  3. 1 4
      src/Components/listItems.js
  4. 4 3
      src/Pages/Login.jsx
  5. 27 0
      src/Pages/RestorePassword.jsx

+ 9 - 0
src/App.css

@@ -156,3 +156,12 @@
156 156
     border : none !important;
157 157
 }
158 158
 
159
+.login_link{
160
+    color : #2ec5d3;
161
+}
162
+
163
+.login_link:hover{
164
+    font-weight : bold;
165
+    color : #3ec5d3;
166
+}
167
+

+ 2 - 0
src/Components/Routes.js

@@ -15,6 +15,7 @@ import { PruebaNueva } from '../Pages/PruebaNueva'
15 15
 import { PruebaAsignar } from '../Pages/PruebaAsignar'
16 16
 import { NotFound } from '../Pages/404'
17 17
 import { Profile } from '../Pages/Profile'
18
+import { RestorePassword } from '../Pages/RestorePassword'
18 19
 
19 20
 import RequireAuth from '../Components/PrivateRoute'
20 21
 
@@ -26,6 +27,7 @@ export default function MyRoutes () {
26 27
             <Route path="/" element={<Navigate to='login'/>} />
27 28
             <Route path="psicoadmin" element={<Navigate to='/login'/>} />
28 29
             <Route path="login" element={<Login/>} />
30
+            <Route path="password/recuperar" element={<RestorePassword/>} />
29 31
             <Route 
30 32
                 path="dashboard" 
31 33
                 element={

+ 1 - 4
src/Components/listItems.js

@@ -19,8 +19,6 @@ function NavItem (props) {
19 19
     let resolved = useResolvedPath(props.route);
20 20
     let match = useMatch({ path: resolved.pathname, end: true });
21 21
 
22
-    console.log(match,typeof(match))
23
-
24 22
     return(
25 23
         <ListItem
26 24
             sx={{ color : '#25344f'}}
@@ -48,8 +46,7 @@ function NavItem (props) {
48 46
 export const MainListItems = (props) =>  {
49 47
 
50 48
     /* TODO
51
-     *
52
-     *
49
+     *   only show submenu when is complete 
53 50
      */
54 51
 
55 52
     const [open, setOpen] = React.useState(false);

+ 4 - 3
src/Pages/Login.jsx

@@ -1,7 +1,7 @@
1 1
 import * as React from 'react';
2 2
 
3 3
 import { 
4
-    Paper, Box, Grid,Link, Checkbox, FormControlLabel, Typography,
4
+    Paper, Box, Grid, Checkbox, FormControlLabel, Typography,
5 5
     TextField, CssBaseline, Button, Avatar
6 6
 } from '@mui/material'
7 7
 
@@ -10,6 +10,7 @@ import { createTheme, ThemeProvider } from '@mui/material/styles';
10 10
 import PersonIcon from '@mui/icons-material/Person';
11 11
 import { useNavigate } from 'react-router-dom'
12 12
 import { Copyright } from '../Components/Footer.js'
13
+import { Link } from 'react-router-dom'
13 14
 import useAuth from '../Auth/useAuth';
14 15
 
15 16
 import { useFormik } from 'formik';
@@ -138,12 +139,12 @@ export function Login() {
138 139
                             </Button>
139 140
                             <Grid container>
140 141
                                 <Grid item xs>
141
-                                    <Link href="#" variant="body2">
142
+                                    <Link className="login_link" to='/password/recuperar'>
142 143
                                         ¿Olvidaste tu contraseña?
143 144
                                     </Link>
144 145
                                 </Grid>
145 146
                                 <Grid item>
146
-                                    <Link href="#" variant="body2">
147
+                                    <Link className="login_link" to='/'>
147 148
                                         {"¿No tienes cuenta? Regístrate"}
148 149
                                     </Link>
149 150
                                 </Grid>

+ 27 - 0
src/Pages/RestorePassword.jsx

@@ -0,0 +1,27 @@
1
+import Logo from '../Images/logo.png'
2
+
3
+export function RestorePassword() {
4
+    return(
5
+        <section className="error_page">
6
+            <div className="page_notfound">
7
+                <div className="row">
8
+                    <div className="col-md-12">    
9
+                        <div className="contenedor_restore">            
10
+                            <div className="logo">
11
+                                <img src={Logo}/>
12
+                            </div>
13
+                            <div className="form_restore">
14
+                                <h1>¿Olvidaste tu contraseña?</h1>
15
+                                <p>Ingresa tu correo electrónico a continuación y te estaremos enviando instrucciones para cambiar tu contraseña.</p>
16
+                                <form>
17
+                                    <input type="email" name="mail" placeholder="Ingresa tu correo electrónico" required/>
18
+                                    <button className="restore_btn" type="submit">Enviar</button>
19
+                                </form>
20
+                            </div>
21
+                        </div>
22
+                    </div>
23
+                </div>
24
+            </div>    
25
+        </section>
26
+    )
27
+}