docs: regenerate HTML/WASM docs after adding 13_config module

This commit is contained in:
Accusys
2026-05-19 03:06:39 +08:00
parent 2335781390
commit 3085a7d048
23 changed files with 526 additions and 159 deletions

View File

@@ -11,7 +11,10 @@ h1 { font-size: 24px; margin-bottom: 24px; text-align: center; }
input { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
button { width: 100%; padding: 10px; background: #0066cc; color: white; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; }
button:hover { background: #0052a3; }
.btn-logout { background: #888; margin-top: 8px; font-size: 13px; padding: 6px; }
.btn-logout:hover { background: #666; }
.error { color: #cc0000; font-size: 13px; margin-bottom: 12px; display: none; }
.success { color: #006600; font-size: 13px; margin-bottom: 12px; display: none; }
</style>
</head>
<body>
@@ -19,9 +22,11 @@ button:hover { background: #0052a3; }
<h1>Momentry Docs</h1>
<form id="loginForm">
<input type="text" id="username" placeholder="Username" value="demo" required>
<input type="password" id="password" placeholder="Password" value="demo" required>
<input type="password" id="password" placeholder="Password" value="" required>
<div class="error" id="error">Invalid credentials</div>
<button type="submit">Login</button>
<button type="button" class="btn-logout" onclick="logout()">Logout (clear session)</button>
<div class="success" id="logoutMsg">Session cleared</div>
</form>
</div>
<script>
@@ -41,6 +46,14 @@ document.getElementById('loginForm').onsubmit = async function(e) {
document.getElementById('error').style.display = 'block';
}
};
async function logout() {
const resp = await fetch('/api/v1/auth/logout', { method: 'POST' });
if (resp.ok) {
document.getElementById('logoutMsg').style.display = 'block';
document.getElementById('error').style.display = 'none';
setTimeout(() => window.location.reload(), 1000);
}
};
</script>
</body>
</html>