cbf19b3f47
Fix remaining clippy/formatting warnings
...
- Merge unnecessary line splits in db/pool.rs and pages/admin.rs
- Prefix unused variable with underscore in login.rs
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:25:48 +08:00
0b15cc7e1c
切换到本地 Tailwind CSS 构建并清理项目文件
...
- 移除 CDN Tailwind,改用本地构建的 style.css
- 添加 package.json、tailwind.config.js、input.css 构建配置
- 清理 prd.json、progress.txt 及误创建的文件
- 修复 login.rs 中未使用变量命名 (_token → token)
- 更新 .gitignore 排除 node_modules 和 package-lock.json
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:35:02 +08:00
c4dfd1f445
Fix additional clippy warnings and update progress
...
- Add #[allow(dead_code)] to temporarily unused functions
- Remove unused is_expired() and UserRole::as_str()
- Fix unused variable warnings (token, theme)
- Update progress.txt: mark all stories complete
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:02:14 +08:00
5afd8b597c
Fix clippy warnings
...
- Remove unnecessary clone on Copy type (navigator)
- Allow dead_code for THEME_KEY constant
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:51:12 +08:00
6df0a7ee19
US-006: 验证 + 修复编译和运行时问题
...
- 修复 migration: role 从 ENUM 改为 VARCHAR(20) 以兼容 tokio-postgres
- 修复 Cargo.toml: 将 chrono/argon2/uuid/rand 改为非 optional,添加 wasm-bindgen/getrandom js
- 修复 main.rs: Tokio runtime panic,改用 std::thread + Runtime::new
- 修复 db/mod.rs wasm stub: DummyPool 替代 deadpool_postgres
- 修复 login/admin.rs: wasm_bindgen::JsCast 条件编译
- 验证通过: 注册✓ 登录✓ get_current_user✓ 重复注册拒绝✓ 错误密码✓
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:49:43 +08:00
14b92c3a89
US-005: 后台页面与路由整合
...
- src/router.rs: Dioxus 路由定义 (/login, /register, /admin, /)
- src/main.rs: 整合所有模块 + server block 启动 dotenvy + session 清理任务
- src/tasks/session_cleanup.rs: 每小时清理过期 session
- 修复编译错误: chrono serde, tokio-postgres chrono, argon2 OsRng
- 移除 server_context 依赖,简化 get_current_user 查询
- Tailwind CSS CDN + darkMode class 配置
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:29:50 +08:00
4a77f2c457
US-004: 前端页面 - 注册与登录
...
- src/pages/register.rs: 注册表单 + 前端验证 + 错误提示
- src/pages/login.rs: 登录表单 + cookie 设置 + 跳转
- src/pages/admin.rs: 认证检查 + 欢迎信息 + 登出
- src/theme.rs: 暗色/亮色主题切换 + localStorage 持久化
- Tailwind CSS CDN + dark: modifier 实现主题
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 16:24:05 +08:00