Add all other pages
This commit is contained in:
parent
f95899f68d
commit
9a29e5da68
@ -12,7 +12,11 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
<script src=""></script>
|
||||
=======
|
||||
<script src="index.js"></script>
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
</body>
|
||||
|
||||
<footer><p>© 2023 Password Manager</p></footer>
|
||||
|
@ -3,7 +3,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
|
||||
<<<<<<< HEAD
|
||||
<link rel="stylesheet" href="../styles/index.css"/>
|
||||
=======
|
||||
<link rel="stylesheet" href="index.css"/>
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
<title>Login</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
@ -25,6 +29,12 @@
|
||||
|
||||
<div class="help">
|
||||
<div>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<a href="" id="forgot_password">Forgot Password</a>
|
||||
</div>
|
||||
<div>
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
<a href="register.html" id="register">Register</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -52,15 +52,19 @@ console.log(formData)
|
||||
=======
|
||||
const response = await fetch('/login', {
|
||||
method: "post",
|
||||
<<<<<<< HEAD
|
||||
/*headers: {
|
||||
>>>>>>> b1b896f (Add api request changes)
|
||||
=======
|
||||
/* headers: {
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
'Content-Type': 'application/json'
|
||||
}*/
|
||||
body: formData
|
||||
});
|
||||
|
||||
if(response.ok) {
|
||||
//next page
|
||||
window.location.href = "dashboard.html";
|
||||
} else if(!response.ok) {
|
||||
if (response.status === 403) {
|
||||
const error = new Error('Access denied: You do not have permission to access this resource.');
|
||||
@ -68,17 +72,18 @@ console.log(formData)
|
||||
setTimeout(()=> {
|
||||
document.getElementById("errlabel").innerHTML = "";
|
||||
},3000)
|
||||
console.log(response)
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
//error
|
||||
/*const errorData = await response.json();
|
||||
const errorData = await response.json();
|
||||
if (response.status === 401) {
|
||||
throw new Error('Invalid username or password')
|
||||
} else {
|
||||
throw new Error(errorData.error)
|
||||
}*/
|
||||
}
|
||||
|
||||
// const data = await response.json();
|
||||
// const token = data.token;
|
||||
@ -102,6 +107,7 @@ console.log(formData)
|
||||
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
function handleAuthRes(data) {
|
||||
if(data.token){
|
||||
@ -112,6 +118,32 @@ function handleAuthRes(data) {
|
||||
}
|
||||
}
|
||||
=======
|
||||
=======
|
||||
const register = document.getElementById("register");
|
||||
|
||||
register.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
window.location.href = "register.html";
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
// function handleAuthRes(data) {
|
||||
// if(data.token){
|
||||
// localStorage.setItem('token', data.token);
|
||||
|
@ -1,4 +1,5 @@
|
||||
* {
|
||||
<<<<<<< HEAD
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@ -187,3 +188,106 @@ footer p{
|
||||
|
||||
box-shadow: rgb(0, 0, 0) 0px 0px 10px;
|
||||
}
|
||||
=======
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: dimgrey;
|
||||
display: flex;
|
||||
margin-top: 25px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image: url("bg.jpg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
width: 90vw;
|
||||
height: 90vh;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
background-color: transparent;
|
||||
backdrop-filter: blur(20px);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 450px;
|
||||
height: 400px;
|
||||
flex-direction: column;
|
||||
padding: 70px;
|
||||
padding-bottom: 90px;
|
||||
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6);
|
||||
row-gap: 8px;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 300px;
|
||||
height: 30px;
|
||||
background-color: transparent;
|
||||
color: rgb(255, 255, 255, 0.8);
|
||||
box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5);
|
||||
border: none;
|
||||
border-top: rgba(255, 255, 255, 0.2) 2px solid;
|
||||
border-left: rgb(255, 255, 255, 0.2) 2px solid;
|
||||
border-radius: 10px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.idiv p {
|
||||
color: white;
|
||||
font-family: 'Pixelify Sans', cursive;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#username::placeholder {
|
||||
color: rgb(255, 255, 255, 0.5);
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#password::placeholder {
|
||||
color: rgb(255, 255, 255, 0.5);
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.idiv {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 10px;
|
||||
justify-content: center;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.idiv p{
|
||||
padding: none;
|
||||
margin: none;
|
||||
display: absolute;
|
||||
translate: 0px 12px;
|
||||
}
|
||||
|
||||
#loginb {
|
||||
background-color: transparent;
|
||||
color: rgb(255, 255, 255, 0.8);
|
||||
padding: 7px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
width: 150px;
|
||||
box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5);
|
||||
translate: 0px -5px;
|
||||
font-family: 'Pixelify Sans', cursive;
|
||||
font-size: 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#loginb:active {
|
||||
background-color: rgb(155, 155, 155, 0.3);
|
||||
}
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
|
@ -4,28 +4,43 @@
|
||||
<head>
|
||||
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="register.css"/>
|
||||
<<<<<<< HEAD
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@500&display=swap" rel="stylesheet">
|
||||
=======
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
<title>Register</title>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
|
||||
<<<<<<< HEAD
|
||||
<button onclick="location.href = 'index.html'" id="returnb"></button>
|
||||
|
||||
<div>
|
||||
<p id="register">Register</p>
|
||||
=======
|
||||
<div>
|
||||
<p id="login">Register</p>
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
</div>
|
||||
|
||||
<div class="idiv">
|
||||
<input class="input" id="username" type="text" placeholder="Username">
|
||||
<input class="input" id="password" type="password" placeholder="Pasword">
|
||||
<<<<<<< HEAD
|
||||
<input class="input" id="conpassword" type="password" placeholder="Confirm Pasword">
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<button id="loginb">Sign Up</button>
|
||||
=======
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<button id="loginb">Login</button>
|
||||
>>>>>>> 22cbef5 (Add all other pages)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user