File tree Expand file tree Collapse file tree 4 files changed +98
-7
lines changed Expand file tree Collapse file tree 4 files changed +98
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { createRouter , createWebHistory } from "vue-router" ;
2
2
import Login from "../views/Login.vue" ;
3
3
import Dashboard from "../views/Dashboard.vue" ;
4
+ import RequestPassword from "../views/RequestPassword.vue" ;
5
+ import ResetPassword from "../views/ResetPassword.vue" ;
4
6
5
7
const routes = [
6
8
{
@@ -12,6 +14,16 @@ const routes = [
12
14
path : '/login' ,
13
15
name : 'login' ,
14
16
component : Login
17
+ } ,
18
+ {
19
+ path : '/request-password' ,
20
+ name : 'requestPassword' ,
21
+ component : RequestPassword
22
+ } ,
23
+ {
24
+ path : '/reset-password/:token' ,
25
+ name : 'resetPassword' ,
26
+ component : ResetPassword
15
27
}
16
28
] ;
17
29
Original file line number Diff line number Diff line change 2
2
<div class =" min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8" >
3
3
<div class =" max-w-md w-full space-y-8" >
4
4
<div >
5
- <img class =" mx-auto h-12 w-auto" src =" https://tailwindui.com/img/logos/workflow-mark-indigo-600.svg" alt =" Workflow" />
6
5
<h2 class =" mt-6 text-center text-3xl font-extrabold text-gray-900" >Sign in to your account</h2 >
7
- <p class =" mt-2 text-center text-sm text-gray-600" >
8
- Or
9
- {{ ' ' }}
10
- <a href =" #" class =" font-medium text-indigo-600 hover:text-indigo-500" > start your 14-day free trial </a >
11
- </p >
12
6
</div >
13
7
<form class =" mt-8 space-y-6" action =" #" method =" POST" >
14
8
<input type =" hidden" name =" remember" value =" true" />
30
24
</div >
31
25
32
26
<div class =" text-sm" >
33
- <a href = " # " class =" font-medium text-indigo-600 hover:text-indigo-500" > Forgot your password? </a >
27
+ <router-link :to = " {name: 'requestPassword'} " class =" font-medium text-indigo-600 hover:text-indigo-500" > Forgot your password? </router-link >
34
28
</div >
35
29
</div >
36
30
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8" >
3
+ <div class =" max-w-md w-full space-y-8" >
4
+ <div >
5
+ <h2 class =" mt-6 text-center text-3xl font-extrabold text-gray-900" >Request new password</h2 >
6
+ </div >
7
+ <form class =" mt-8 space-y-6" action =" #" method =" POST" >
8
+ <input type =" hidden" name =" remember" value =" true" />
9
+ <div class =" rounded-md shadow-sm -space-y-px" >
10
+ <div >
11
+ <label for =" email-address" class =" sr-only" >Email address</label >
12
+ <input id =" email-address" name =" email" type =" email" autocomplete =" email" required =" " class =" appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm" placeholder =" Email address" />
13
+ </div >
14
+ </div >
15
+
16
+ <div class =" flex items-center justify-between" >
17
+ <div class =" text-sm" >
18
+ <router-link :to =" {name: 'login'}" class =" font-medium text-indigo-600 hover:text-indigo-500" > Remember your password? </router-link >
19
+ </div >
20
+ </div >
21
+
22
+ <div >
23
+ <button type =" submit" class =" group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" >
24
+ <span class =" absolute left-0 inset-y-0 flex items-center pl-3" >
25
+ <LockClosedIcon class =" h-5 w-5 text-indigo-500 group-hover:text-indigo-400" aria-hidden =" true" />
26
+ </span >
27
+ Submit
28
+ </button >
29
+ </div >
30
+ </form >
31
+ </div >
32
+ </div >
33
+ </template >
34
+
35
+ <script setup>
36
+ import { LockClosedIcon } from ' @heroicons/vue/solid'
37
+ </script >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8" >
3
+ <div class =" max-w-md w-full space-y-8" >
4
+ <div >
5
+ <h2 class =" mt-6 text-center text-3xl font-extrabold text-gray-900" >Set new password</h2 >
6
+ </div >
7
+ <form class =" mt-8 space-y-6" action =" #" method =" POST" >
8
+ <input type =" hidden" name =" remember" value =" true" />
9
+ <div class =" rounded-md shadow-sm -space-y-px" >
10
+ <div >
11
+ <label for =" new-password" class =" sr-only" >New Password</label >
12
+ <input id =" new-password" name =" password" type =" password" required =" "
13
+ class =" appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
14
+ placeholder =" New Password" />
15
+ </div >
16
+ <div >
17
+ <label for =" password-repeat" class =" sr-only" >Repeat Password</label >
18
+ <input id =" password-repeat" name =" password_repeat" type =" password" required =" "
19
+ class =" appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm"
20
+ placeholder =" Repeat Password" />
21
+ </div >
22
+ </div >
23
+
24
+ <div class =" flex items-center justify-between" >
25
+ <div class =" text-sm" >
26
+ <router-link :to =" {name: 'login'}" class =" font-medium text-indigo-600 hover:text-indigo-500" >
27
+ Go back to Login
28
+ </router-link >
29
+ </div >
30
+ </div >
31
+
32
+ <div >
33
+ <button type =" submit"
34
+ class =" group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" >
35
+ <span class =" absolute left-0 inset-y-0 flex items-center pl-3" >
36
+ <LockClosedIcon class =" h-5 w-5 text-indigo-500 group-hover:text-indigo-400" aria-hidden =" true" />
37
+ </span >
38
+ Submit
39
+ </button >
40
+ </div >
41
+ </form >
42
+ </div >
43
+ </div >
44
+ </template >
45
+
46
+ <script setup>
47
+ import {LockClosedIcon } from ' @heroicons/vue/solid'
48
+ </script >
You can’t perform that action at this time.
0 commit comments