feat: 新增站点公告系统与多项体验优化
此提交完成了以下核心功能与优化: 1. 新增站点公告全流程支持:包含公告模型、CRUD接口、管理后台页面、公告详情页与首页展示 2. 实现评论楼层化与回复嵌套:重构评论系统为树状结构,支持回复评论与层级限制 3. 添加用户在线状态追踪:异步更新用户最后活跃时间并做SQL限频 4. 优化用户体验:移动端浮动操作条、统一板块标签样式、用户页签到积分展示、注册即登录优化 5. 其他细节优化:SEO站点地图新增公告页、评论分页与统计、登录/注册表单增强等
This commit is contained in:
@@ -57,12 +57,14 @@ export default function LoginPage() {
|
||||
return (
|
||||
<div className="max-w-md mx-auto pt-8 sm:pt-14">
|
||||
<div className="mb-7 text-center">
|
||||
<span
|
||||
className="inline-flex w-14 h-14 rounded-2xl items-center justify-center mb-4"
|
||||
<Link
|
||||
href="/"
|
||||
aria-label="返回首页"
|
||||
className="inline-flex w-14 h-14 rounded-2xl items-center justify-center mb-4 transition-transform duration-300 hover:rotate-[-6deg]"
|
||||
style={{ background: "var(--accent-soft)", color: "var(--accent)" }}
|
||||
>
|
||||
<MessagesSquare size={26} />
|
||||
</span>
|
||||
</Link>
|
||||
<h1 className="text-[28px] font-extrabold tracking-tight" style={{ color: "var(--ink)" }}>
|
||||
欢迎回来
|
||||
</h1>
|
||||
@@ -72,28 +74,32 @@ export default function LoginPage() {
|
||||
</div>
|
||||
|
||||
<form onSubmit={handleSubmit} className="panel p-6 sm:p-7 space-y-4">
|
||||
{error && <div className="alert-error">{error}</div>}
|
||||
{error && <div className="alert-error" role="alert">{error}</div>}
|
||||
<div>
|
||||
<label className="field-label">用户名</label>
|
||||
<label className="field-label" htmlFor="login-username">用户名</label>
|
||||
<input
|
||||
id="login-username"
|
||||
type="text"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
required
|
||||
autoFocus
|
||||
autoComplete="username"
|
||||
className="field"
|
||||
placeholder="testuser"
|
||||
placeholder="你的用户名"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">密码</label>
|
||||
<label className="field-label" htmlFor="login-password">密码</label>
|
||||
<input
|
||||
id="login-password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
required
|
||||
autoComplete="current-password"
|
||||
className="field"
|
||||
placeholder="••••••"
|
||||
placeholder="输入密码"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" disabled={loading} className="btn btn-primary w-full justify-center mt-2">
|
||||
|
||||
Reference in New Issue
Block a user