- Move service account credentials to .env (loaded server-side only) - server.js: inject credentials in proxy, strip any client-provided creds, replace deprecated url.parse with new URL - auth.js / dashboard.js: remove all hardcoded passwords from client code - dashboard.js: remove broken category filter, fix redundant user.info call (use stored userId), add HTML escaping against XSS - login.html: remove unused password field - dashboard.html: remove broken category filter UI - Add .gitignore to exclude .env and node_modules - Add .env.example as configuration template Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
130 lines
5.6 KiB
HTML
130 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>3M - OMG Portal</title>
|
|
<link rel="icon" type="image/png" href="Images/login_logo.png">
|
|
<link rel="stylesheet" href="styles.css">
|
|
</head>
|
|
<body class="login-page">
|
|
<div class="login-container">
|
|
<div class="login-card">
|
|
<div class="logo-container">
|
|
<img src="Images/login_logo.png" alt="3M Logo" class="logo">
|
|
</div>
|
|
|
|
<h2 class="welcome-text">Hello, welcome to OMG Automation</h2>
|
|
|
|
<form id="loginForm" class="login-form">
|
|
<div class="form-group">
|
|
<input
|
|
type="text"
|
|
id="username"
|
|
name="username"
|
|
placeholder="Username"
|
|
required
|
|
class="form-input"
|
|
>
|
|
</div>
|
|
|
|
<div class="button-container">
|
|
<button type="button" class="login-button oliver-button" id="oliverLoginButton">
|
|
<span id="oliverButtonText">Oliver Login</span>
|
|
<span id="oliverSpinner" class="spinner" style="display: none;"></span>
|
|
</button>
|
|
<button type="button" class="login-button tmm-button" id="tmmLoginButton">
|
|
<span id="tmmButtonText">3M Login</span>
|
|
<span id="tmmSpinner" class="spinner" style="display: none;"></span>
|
|
</button>
|
|
</div>
|
|
|
|
<div id="errorMessage" class="error-message" style="display: none;"></div>
|
|
</form>
|
|
|
|
<div class="footer-links">
|
|
<a href="#" class="footer-link" id="termsLink">Terms of Use. Privacy policy</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Terms of Use Modal -->
|
|
<div id="termsModal" class="terms-modal">
|
|
<div class="terms-modal-content">
|
|
<div class="terms-modal-header">
|
|
<h2>Terms of Use & Privacy Policy</h2>
|
|
<button class="terms-close-btn" id="termsCloseBtn">×</button>
|
|
</div>
|
|
<div class="terms-modal-body">
|
|
<h3>Terms of Use</h3>
|
|
<p>
|
|
Welcome to the 3M OMG Portal. By accessing and using this portal, you agree to be bound by these Terms of Use.
|
|
This is a placeholder text for demonstration purposes. In a production environment, this would contain the actual
|
|
legal terms and conditions governing the use of this portal.
|
|
</p>
|
|
<p>
|
|
Users are expected to maintain the confidentiality of their login credentials and are responsible for all activities
|
|
that occur under their account. Unauthorized access or misuse of the portal may result in termination of access and
|
|
potential legal action.
|
|
</p>
|
|
<p>
|
|
The portal provides access to various tools and resources for job management and automation. Users should ensure
|
|
they have appropriate authorization before accessing or modifying any content within the system.
|
|
</p>
|
|
|
|
<h3>Privacy Policy</h3>
|
|
<p>
|
|
3M is committed to protecting your privacy. This is placeholder text for the privacy policy. In production, this
|
|
section would detail how we collect, use, store, and protect your personal information.
|
|
</p>
|
|
<p>
|
|
We collect information necessary to provide you with access to the portal and its services. This may include your
|
|
username, email address, and usage data. All data is stored securely and is only accessible to authorized personnel.
|
|
</p>
|
|
<p>
|
|
By using this portal, you consent to the collection and use of your information as described in this privacy policy.
|
|
We do not share your personal information with third parties except as necessary to provide the services or as
|
|
required by law.
|
|
</p>
|
|
|
|
<h3>Contact Information</h3>
|
|
<p>
|
|
If you have any questions about these Terms of Use or our Privacy Policy, please contact your system administrator
|
|
or the 3M support team.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="auth.js"></script>
|
|
<script>
|
|
// Terms modal handling
|
|
const termsModal = document.getElementById('termsModal');
|
|
const termsLink = document.getElementById('termsLink');
|
|
const termsCloseBtn = document.getElementById('termsCloseBtn');
|
|
|
|
termsLink.addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
termsModal.classList.add('active');
|
|
});
|
|
|
|
termsCloseBtn.addEventListener('click', function() {
|
|
termsModal.classList.remove('active');
|
|
});
|
|
|
|
// Close modal when clicking outside
|
|
termsModal.addEventListener('click', function(e) {
|
|
if (e.target === termsModal) {
|
|
termsModal.classList.remove('active');
|
|
}
|
|
});
|
|
|
|
// Close modal with Escape key
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Escape' && termsModal.classList.contains('active')) {
|
|
termsModal.classList.remove('active');
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|