change admin menu url to smtp-server

This commit is contained in:
2026-08-15 21:51:43 +01:00
parent f60dbcc6b0
commit ca0ad630d2
45 changed files with 188 additions and 188 deletions
@@ -5,8 +5,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Set up two-factor authentication - mailgoserver</title>
<link href="/pymta-manager/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/pymta-manager/static/vendor/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<link href="/smtp-server/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/smtp-server/static/vendor/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<style>
body { background-color: #1a1a1a; color: #e0e0e0; min-height: 100vh; display: flex; align-items: center; }
.setup-card { max-width: 480px; margin: 0 auto; width: 100%; }
@@ -49,14 +49,14 @@
<div class="card-header"><h5 class="mb-0"><i class="bi bi-qr-code me-2"></i>Authenticator App</h5></div>
<div class="card-body">
<p class="text-muted">Use Google Authenticator, 1Password, or any TOTP app.</p>
<form method="post" action="/pymta-manager/account/totp/setup">
<form method="post" action="/smtp-server/account/totp/setup">
<button type="submit" class="btn btn-outline-primary"><i class="bi bi-qr-code me-1"></i>Set up Authenticator App</button>
</form>
</div>
</div>
</div>
<script src="/pymta-manager/static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/smtp-server/static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('.toast').forEach(function(el) { new bootstrap.Toast(el, {delay: 6000}).show(); });
@@ -79,7 +79,7 @@
const errEl = document.getElementById('passkey-error');
errEl.classList.add('d-none');
try {
const beginResp = await fetch('/pymta-manager/account/passkey/begin', { method: 'POST' });
const beginResp = await fetch('/smtp-server/account/passkey/begin', { method: 'POST' });
if (!beginResp.ok) throw new Error((await beginResp.json()).error || 'Could not start passkey registration');
const options = await beginResp.json();
const publicKey = options.publicKey;
@@ -96,11 +96,11 @@
clientDataJSON: bufToB64url(cred.response.clientDataJSON),
},
};
const finishResp = await fetch('/pymta-manager/account/passkey/finish', {
const finishResp = await fetch('/smtp-server/account/passkey/finish', {
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body),
});
if (!finishResp.ok) throw new Error((await finishResp.json()).error || 'Could not save passkey');
window.location.href = '/pymta-manager/';
window.location.href = '/smtp-server/';
} catch (e) {
errEl.textContent = e.message || 'Passkey registration failed';
errEl.classList.remove('d-none');