update url to server url

This commit is contained in:
smfahim25 2025-03-20 15:50:41 +06:00
parent c570604348
commit 90fec3fcc6
3 changed files with 224 additions and 217 deletions

View file

@ -1,71 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Already Verified</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
text-align: center;
width: 350px;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
text-align: center;
width: 350px;
}
h1 {
color: #28a745;
font-size: 24px;
}
h1 {
color: #28a745;
font-size: 24px;
}
p {
margin: 15px 0;
font-size: 16px;
color: #333;
}
p {
margin: 15px 0;
font-size: 16px;
color: #333;
}
.btn {
display: inline-block;
padding: 12px 20px;
font-size: 16px;
color: white;
background: #ff3366;
text-decoration: none;
border-radius: 5px;
transition: 0.3s;
}
.btn {
display: inline-block;
padding: 12px 20px;
font-size: 16px;
color: white;
background: #ff3366;
text-decoration: none;
border-radius: 5px;
transition: 0.3s;
}
.btn:hover {
background: #cc284f;
}
.btn:hover {
background: #cc284f;
}
</style>
</head>
<body>
</head>
<body>
<div class="container">
<h1>✅ Verified User!</h1>
<p>You are already verified. Please log in to continue.</p>
<a href="http://localhost:5175/login" class="btn">Log In</a>
<h1>✅ Verified User!</h1>
<p>You are already verified. Please log in to continue.</p>
<a href="https://canvasdev.planpostai.com/login" class="btn">Log In</a>
</div>
</body>
</html>
</body>
</html>

View file

@ -1,129 +1,142 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Reset Password</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
width: 350px;
text-align: center;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
width: 350px;
text-align: center;
}
h2 {
margin-bottom: 15px;
color: #333;
}
h2 {
margin-bottom: 15px;
color: #333;
}
.input-group {
width: 100%;
margin-bottom: 15px;
}
.input-group {
width: 100%;
margin-bottom: 15px;
}
input {
width: 100%;
padding: 10px;
border: 2px solid #ff6a88;
border-radius: 5px;
font-size: 16px;
outline: none;
}
input {
width: 100%;
padding: 10px;
border: 2px solid #ff6a88;
border-radius: 5px;
font-size: 16px;
outline: none;
}
input:focus {
border-color: #ff3366;
}
input:focus {
border-color: #ff3366;
}
.error {
color: red;
font-size: 14px;
display: none;
margin-top: 5px;
}
.error {
color: red;
font-size: 14px;
display: none;
margin-top: 5px;
}
button {
width: 100%;
padding: 12px;
background: #ff3366;
border: none;
color: white;
font-size: 16px;
cursor: pointer;
border-radius: 5px;
transition: 0.3s;
}
button {
width: 100%;
padding: 12px;
background: #ff3366;
border: none;
color: white;
font-size: 16px;
cursor: pointer;
border-radius: 5px;
transition: 0.3s;
}
button:hover {
background: #cc284f;
}
button:hover {
background: #cc284f;
}
</style>
</head>
<body>
</head>
<body>
<div class="container">
<h2>Reset Your Password</h2>
<hr><br>
<form id="reset-form">
<div class="input-group">
<input type="password" id="password" placeholder="Enter new password" required />
</div>
<div class="input-group">
<input type="password" id="confirm-password" placeholder="Confirm new password" required />
<p class="error" id="error-message">Passwords do not match!</p>
</div>
<button type="submit">Reset Password</button>
</form>
<h2>Reset Your Password</h2>
<hr />
<br />
<form id="reset-form">
<div class="input-group">
<input
type="password"
id="password"
placeholder="Enter new password"
required
/>
</div>
<div class="input-group">
<input
type="password"
id="confirm-password"
placeholder="Confirm new password"
required
/>
<p class="error" id="error-message">Passwords do not match!</p>
</div>
<button type="submit">Reset Password</button>
</form>
</div>
<script>
document.getElementById("reset-form").addEventListener("submit", async function (event) {
event.preventDefault();
document
.getElementById("reset-form")
.addEventListener("submit", async function (event) {
event.preventDefault();
const password = document.getElementById("password").value;
const confirmPassword = document.getElementById("confirm-password").value;
const errorMessage = document.getElementById("error-message");
const password = document.getElementById("password").value;
const confirmPassword =
document.getElementById("confirm-password").value;
const errorMessage = document.getElementById("error-message");
if (password !== confirmPassword) {
errorMessage.style.display = "block";
return;
} else {
errorMessage.style.display = "none";
if (password !== confirmPassword) {
errorMessage.style.display = "block";
return;
} else {
errorMessage.style.display = "none";
}
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get("token");
const response = await fetch(
`https://canvasdev.planpostai.com/api/auth/reset-password?token=${token}`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ password }),
}
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get("token");
const response = await fetch(`http://localhost:3000/api/auth/reset-password?token=${token}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ password })
});
const data = await response.json();
window.location.href="http://localhost:5175/login";
alert(data.message);
);
const data = await response.json();
window.location.href = "https://canvasdev.planpostai.com/login";
alert(data.message);
});
</script>
</body>
</html>
</body>
</html>

View file

@ -1,69 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Verification Successful</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f5f0ff;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
text-align: center;
width: 350px;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
text-align: center;
width: 350px;
}
h1 {
color: #28a745;
font-size: 24px;
}
h1 {
color: #28a745;
font-size: 24px;
}
p {
margin: 15px 0;
font-size: 16px;
color: #333;
}
p {
margin: 15px 0;
font-size: 16px;
color: #333;
}
.btn {
display: inline-block;
padding: 12px 20px;
font-size: 16px;
color: white;
background: #ff3366;
text-decoration: none;
border-radius: 5px;
transition: 0.3s;
}
.btn {
display: inline-block;
padding: 12px 20px;
font-size: 16px;
color: white;
background: #ff3366;
text-decoration: none;
border-radius: 5px;
transition: 0.3s;
}
.btn:hover {
background: #cc284f;
}
.btn:hover {
background: #cc284f;
}
</style>
</head>
</head>
<body>
<body>
<div class="container">
<h1>✅ Verification Successful!</h1>
<p>Your email has been verified. You can now log in.</p>
<a href="http://localhost:5175/login" class="btn">Log In</a>
<h1>✅ Verification Successful!</h1>
<p>Your email has been verified. You can now log in.</p>
<a href="https://canvasdev.planpostai.com/login" class="btn">Log In</a>
</div>
</body>
</html>
</body>
</html>