Initial commit: SenSu Alpha 0.2.0
- 13-service async plugin framework - Textual TUI with CLI fallback - Plugin hot-reload + permission system - Web management panel (aiohttp) - Bridge-based inter-module communication - 10 regression tests Fixes applied: - PBKDF2-SHA256 auth (was plain SHA256) - Auth bypass removed (was allow-all on fail) - Bare excepts replaced with logged errors - CatFramework/DreamSu -> SenSu naming unified - ServiceManager: health checks + startup_order - Env var credentials (SENSU_ADMIN_PASSWORD etc)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SenSu 登录</title>
|
||||
<link rel="stylesheet" href="./static/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrapper">
|
||||
<div class="login-card">
|
||||
<h2>🐱 SenSu Login</h2>
|
||||
<div class="input-group"><label>用户名</label><input type="text" id="u" value="admin"></div>
|
||||
<div class="input-group"><label>密码</label><input type="password" id="p" value="admin"></div>
|
||||
<button class="btn-primary" onclick="doLogin()">进入系统</button>
|
||||
<div id="err" class="err-msg"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
async function doLogin() {
|
||||
const u = document.getElementById('u').value;
|
||||
const p = document.getElementById('p').value;
|
||||
const err = document.getElementById('err');
|
||||
err.textContent = "验证中...";
|
||||
try {
|
||||
const res = await fetch('./api/login', {
|
||||
method: 'POST', headers: {'Content-Type': 'application/json'},
|
||||
credentials: 'include', body: JSON.stringify({username: u, password: p})
|
||||
});
|
||||
const data = await res.json();
|
||||
if(res.ok && data.success) window.location.href = './home.html';
|
||||
else err.textContent = data.msg || "凭证错误";
|
||||
} catch(e) { err.textContent = "网络异常"; }
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user