归档 artalk-cf 评论后端 + rss-robot 到 blog-admin(含技术选型/模块分布 README)
Deploy to Production / pre-check (push) Successful in 58s
Deploy to Production / build (push) Successful in 4m3s
Deploy to Production / deploy-edgeone (push) Successful in 3m48s
Deploy to Production / finalize (push) Successful in 26s
Deploy to Production / notify-failure (push) Skipped

This commit is contained in:
zqlit committed 2026-10-04 08:45:40 +08:00
1 parent 855a001046
commit a74b3c7127
98 files changed
+15657

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UAPI</title>
<style>
:root { --bg: #0a0f0f; --card: #0f1a1a; --border: #1a3a2a; --text: #c9d1d9; --muted: #5a7a5a; --accent: #3fb950; }
* { margin:0; padding:0; box-sizing:border-box; }
body { background:var(--bg); color:var(--text); font-family:'JetBrains Mono','Fira Code','SF Mono',Consolas,monospace; min-height:100vh; display:flex; align-items:center; justify-content:center; }
.box { background:var(--card); border:1px solid var(--border); border-radius:4px; padding:36px; width:100%; max-width:360px; text-align:center; }
.box h1 { font-size:18px; color:var(--accent); font-weight:400; margin-bottom:6px; }
.box p { color:var(--muted); font-size:12px; margin-bottom:20px; }
.box input { width:100%; padding:10px 12px; background:#050a0a; border:1px solid var(--border); border-radius:4px; color:#fff; font-size:14px; font-family:inherit; outline:none; }
.box input:focus { border-color:var(--accent); }
.box button { width:100%; margin-top:12px; padding:10px; background:var(--accent); color:#000; border:none; border-radius:4px; font-size:14px; font-family:inherit; cursor:pointer; font-weight:600; }
.box button:hover { background:#2ea043; color:#fff; }
.err { color:var(--red); font-size:12px; margin-top:10px; display:none; }
</style>
</head>
<body>
<div class="box">
<h1>[UAPI] 身份验证</h1>
<p>请输入访问口令</p>
<input type="password" id="pwd" placeholder="口令" autofocus>
<button onclick="login()">进入系统</button>
<div class="err" id="err">口令错误</div>
</div>
<script>
async function login(){const t=document.getElementById('pwd').value;if(!t)return;try{const r=await fetch('/api/auth?token='+encodeURIComponent(t));if(r.ok){document.cookie='site_token='+t+';path=/;max-age=2592000;SameSite=Lax';location.href='/?token='+encodeURIComponent(t)}else{document.getElementById('err').style.display='block'}}catch{document.getElementById('err').style.display='block'}}
document.getElementById('pwd').addEventListener('keydown',e=>{if(e.key==='Enter')login()});
</script>
</body>
</html>