This commit is contained in:
parent
0b9d6f801e
commit
52e4eb8133
|
|
@ -80,7 +80,7 @@ body {
|
||||||
padding: 0 1.5rem;
|
padding: 0 1.5rem;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1024px;
|
/* max-width: 1024px; */
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
||||||
|
|
@ -26,19 +26,6 @@ const app = express();
|
||||||
const server = new createServer(app);
|
const server = new createServer(app);
|
||||||
const io = new Server(server);
|
const io = new Server(server);
|
||||||
|
|
||||||
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
|
||||||
console.log("⚠️ Certificate error:", url);
|
|
||||||
|
|
||||||
// Allow for ngrok only
|
|
||||||
if (url.includes("ngrok")) {
|
|
||||||
event.preventDefault();
|
|
||||||
callback(true); // approve the certificate
|
|
||||||
} else {
|
|
||||||
callback(false); // reject others
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
||||||
console.log("⚠️ Certificate error:", url);
|
console.log("⚠️ Certificate error:", url);
|
||||||
|
|
||||||
|
|
@ -93,7 +80,8 @@ app.get('/varegister/:sf_token?', (req, res) => {
|
||||||
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
|
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
|
||||||
|
|
||||||
if (decoded) {
|
if (decoded) {
|
||||||
res.render('va_register', { title: "VA Registration" });
|
const email = decoded.email;
|
||||||
|
res.render('va_register', { title: "VA Registration", email });
|
||||||
} else {
|
} else {
|
||||||
res.render('not_found', { title: "VA Registration" });
|
res.render('not_found', { title: "VA Registration" });
|
||||||
}
|
}
|
||||||
|
|
@ -114,7 +102,8 @@ app.get('/clientregister/:sf_token?', (req, res) => {
|
||||||
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
|
const decoded = jwt.verify(sf_token, process.env.JWT_SECRET_SF_TOKEN);
|
||||||
|
|
||||||
if (decoded) {
|
if (decoded) {
|
||||||
res.render('va_client_register', { title: "Client Registration" });
|
const email = decoded.email;
|
||||||
|
res.render('va_client_register', { title: "Client Registration", email });
|
||||||
} else {
|
} else {
|
||||||
res.render('not_found', { title: "Client Registration" });
|
res.render('not_found', { title: "Client Registration" });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="va-info">
|
<div class="va-info">
|
||||||
<div class="va-name">${va.firstName} ${va.lastName}</div>
|
<div class="va-name">${va.name}</div>
|
||||||
<div class="va-email">${va.email || 'N/A'}</div>
|
<div class="va-email">${va.email || 'N/A'}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -304,14 +304,14 @@
|
||||||
vaEmptyState.style.display = 'none';
|
vaEmptyState.style.display = 'none';
|
||||||
|
|
||||||
// Add event listeners to view links
|
// Add event listeners to view links
|
||||||
document.querySelectorAll('.view-link').forEach(link => {
|
// document.querySelectorAll('.view-link').forEach(link => {
|
||||||
link.addEventListener('click', function(e) {
|
// link.addEventListener('click', function(e) {
|
||||||
e.preventDefault();
|
// e.preventDefault();
|
||||||
const vaId = this.getAttribute('data-va-id');
|
// const vaId = this.getAttribute('data-va-id');
|
||||||
// You can update this link as needed
|
// // You can update this link as needed
|
||||||
window.location.href = `/client/virtual-assistants/${vaId}`;
|
// window.location.href = `/client/virtual-assistants/${vaId}`;
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
} else {
|
} else {
|
||||||
vaTableBody.innerHTML = '';
|
vaTableBody.innerHTML = '';
|
||||||
vaTableBody.style.display = 'none';
|
vaTableBody.style.display = 'none';
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
|
<img id="logo-img" src="/public/images/logo-white-vertical.svg" alt="DocVA Logo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="login-card">
|
<div class="login-card">
|
||||||
|
|
@ -224,7 +224,7 @@
|
||||||
<input type="password" name="password" placeholder="Enter your password *" required />
|
<input type="password" name="password" placeholder="Enter your password *" required />
|
||||||
<a href="/client/forgot-password" class="forgot">Forgot password?</a>
|
<a href="/client/forgot-password" class="forgot">Forgot password?</a>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">🔒 Log in using password</button>
|
<button type="submit" class="btn btn-primary">Log in using password</button>
|
||||||
|
|
||||||
<!-- <div class="divider">OR</div>
|
<!-- <div class="divider">OR</div>
|
||||||
|
|
||||||
|
|
@ -236,6 +236,10 @@
|
||||||
const root = document.documentElement;
|
const root = document.documentElement;
|
||||||
|
|
||||||
function setTheme(theme) {
|
function setTheme(theme) {
|
||||||
|
document.getElementById("logo-img").src =
|
||||||
|
theme === "dark"
|
||||||
|
? "/public/images/logo-white-vertical.svg"
|
||||||
|
: "/public/images/logo-colored-vertical.svg";
|
||||||
root.setAttribute("data-theme", theme);
|
root.setAttribute("data-theme", theme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<input type="email" id="email" class="input-field" placeholder=" " required>
|
<input type="email" id="email" class="input-field" placeholder=" " value="<%= email %>" readonly disabled required>
|
||||||
<label for="email" class="input-label">Email *</label>
|
<label for="email" class="input-label">Email *</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
<form id="account-form">
|
<form id="account-form">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<input type="email" id="email" class="input-field" placeholder=" " required>
|
<input type="email" id="email" class="input-field" placeholder=" " value="<%= email %>" readonly disabled required>
|
||||||
<label for="email" class="input-label">Email Address *</label>
|
<label for="email" class="input-label">Email Address *</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue