feat: 首页仪表盘改造为深色科技风格 + Apple Health 步数同步
UI 改造: - 首页采用深色科技风格 (Dark Tech) - Tailwind CSS + Glass Morphism 毛玻璃效果 - 左侧边栏导航 (PC端) / 底部导航 (移动端) - Material Symbols 图标 + Space Grotesk 字体 - Chart.js 深色主题适配 新功能: - Apple Health 步数同步 API (/api/steps) - 设置页面添加 iOS 快捷指令配置说明 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -153,6 +153,9 @@ class DeepSeekVisionAnalyzer:
|
||||
| GET | `/api/meals/nutrition` | 营养统计 |
|
||||
| POST | `/api/exercise` | 添加运动记录 |
|
||||
| GET | `/api/exercises` | 查询运动记录 |
|
||||
| POST | `/api/steps` | 同步步数(iOS 快捷指令调用) |
|
||||
| GET | `/api/steps` | 查询步数记录 |
|
||||
| GET | `/api/steps/today` | 获取今日步数 |
|
||||
| POST | `/api/sleep` | 添加睡眠记录 |
|
||||
| POST | `/api/weight` | 添加体重记录 |
|
||||
| GET | `/api/config` | 获取用户配置 |
|
||||
@@ -216,6 +219,9 @@ weight (id, user_id, date, weight, body_fat, notes)
|
||||
-- 阅读记录
|
||||
reading (id, user_id, date, book_title, pages, duration, notes)
|
||||
|
||||
-- 步数记录
|
||||
steps (id, user_id, date, steps, distance, calories, source, synced_at)
|
||||
|
||||
-- 用户配置
|
||||
user_config (id, user_id, height, weight, age, gender, activity_level, goal)
|
||||
|
||||
@@ -258,6 +264,11 @@ invite (id, code, created_by, used_by, used_at, expires_at)
|
||||
|
||||
## 最近更新
|
||||
|
||||
- **Apple Health 步数同步**:支持通过 iOS 快捷指令同步 Apple Health 步数数据
|
||||
- 数据库:新增 `steps` 表存储每日步数
|
||||
- API:`/api/steps` (POST 同步, GET 查询), `/api/steps/today` (今日步数)
|
||||
- 前端:运动页面显示今日步数卡片,设置页面提供 iOS 快捷指令配置说明
|
||||
|
||||
- **文字 AI 识别功能**:在饮食页面添加"文字AI识别"按钮,支持输入文字描述后自动识别卡路里
|
||||
- 前端:`web/app.py` (第 5041 行按钮,第 5166 行函数)
|
||||
- 后端:`/api/meal/recognize` 支持 `text` 参数
|
||||
|
||||
Reference in New Issue
Block a user