Commit Graph
64 Commits
Author SHA1 Message Date
admin 469630e7da ci(deploy): 改为 GitHub Webhook 触发部署 2026-10-20 14:23:31 +08:00
admin 69bfe3ce0e style: 格式化 CSS、JS 和 HTML 代码 2026-09-22 09:31:55 +08:00
admin 40b00a8b40 feat(shelf): 新增书架分页展示与排序选择 2026-09-21 22:25:11 +08:00
admin bbed5a5b98 merge: 合并 ICP 备案页脚到 dev 2026-09-21 18:14:05 +08:00
admin fb0cf30086 feat(footer): 展示网站 ICP 备案信息 2026-09-21 18:13:34 +08:00
admin c220dcad7a merge: 合并登录权限到 master 2026-09-21 17:47:36 +08:00
admin 20651f275b merge: 合并登录权限到 dev 2026-09-21 17:47:20 +08:00
admin 810b52a051 feat(auth): 增加登录验证和五天会话 2026-09-21 17:46:43 +08:00
admin c82ef4f06e chore(release): 合并 dev 并启用 master 部署 2026-09-14 16:12:06 +08:00
admin ecd16bcefc ci(deploy): 合并 master 单分支部署配置 2026-09-14 16:09:47 +08:00
admin 8171705c5f ci(deploy): 仅允许 master 自动部署 2026-09-14 16:09:02 +08:00
admin 77e05998a5 docs(maintenance): 合并日常排障文档 2026-09-14 15:59:57 +08:00
admin df4c3f86f0 docs(maintenance): 记录端口与证书排障 2026-09-14 15:59:27 +08:00
admin d3ed683652 fix(api): 合并接口兼容热修复 2026-09-14 15:41:59 +08:00
admin 30ee66cef5 fix(api): 兼容部署过渡期接口路径 2026-09-14 15:41:09 +08:00
admin 5cf98c0c23 refactor(api): 合并接口命名清理 2026-09-14 15:36:33 +08:00
admin dcf4cb0719 refactor(api): 去除代码版本命名 2026-09-14 15:35:53 +08:00
admin 4d706c97a1 chore(release): 合并 dev 至 1.1 v1.1 2026-09-12 17:33:28 +08:00
admin bbc4bdd140 ci(deploy): 添加 dev 自动部署脚本 2026-09-12 17:24:36 +08:00
admin e5d1b7fa42 merge: 合并阅读目标持久化与紧凑布局 2026-09-12 17:17:15 +08:00
admin 094e1aca3d feat(reading-goals): 持久化阅读目标并收紧看板布局 2026-09-12 17:16:40 +08:00
admin 61d3951905 feat(discovery): 完善书籍搜索推荐与日志记录 2026-09-12 08:39:02 +08:00
admin aee8c58b04 chore(config): 切换项目数据源到远程 MySQL 2026-09-12 08:39:02 +08:00
admin d33601c987 fix(discovery): 修复真实书籍封面显示 2026-09-12 08:38:58 +08:00
admin db8d5fc391 fix(server): 修复启动脚本端口检测与打印 2026-09-12 08:38:30 +08:00
admin a1f54e765e Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	.gitignore
#	app.py
#	static/js/app.js
2026-09-11 18:25:03 +08:00
admin 8d2f8f521f Merge branch 'codex/weread-dashboard-design' into dev 2026-09-11 18:22:33 +08:00
admin 87367e237a Merge branch 'feat/v2-real-data' into dev
v2 看板前端接入真实微信读书数据接口。

包含:
- feat(api): 新增 /api/v2/* 数据接口层(独立 Blueprint,v1 接口零改动)
- feat(web): 前端样式完全沿用 2.0 设计稿,仅替换数据来源为真实接口
- chore(legacy): 归档 v1 前端至 legacy/v1
- chore: 新增 start_dashboard.sh 启动脚本
- docs: 补充 V2 接口文档与验证截图
2026-09-11 18:21:20 +08:00
admin d917936049 docs: 补充 v2 接口文档与验证截图,更新 README
- docs/V2_API.md 说明 /api/v2/* 各接口参数与回包结构
- docs/screenshots/ 归档概览/书架/笔记/详情/发现/暗色主题验证截图
- README 说明 v2 为默认前端、启动方式与 v1 归档位置
2026-09-11 18:21:13 +08:00
admin 4cbaabd42c chore: 新增 v2 看板启动脚本 start_dashboard.sh
封装启动流程,支持 PORT / WEREAD_API_KEY / PYTHON_BIN 环境变量。
默认使用托管 Python 环境,避免系统解释器缺少 flask 依赖。
2026-09-11 18:21:13 +08:00
admin 25293a1d50 chore(legacy): 归档 v1 前端至 legacy/v1
v2 成为默认前端后,把 v1 的模板与静态资源原样归档保留,
便于对照回滚。v1 后端接口 /api/* 未做改动。
2026-09-11 18:21:13 +08:00
admin 8af75454a4 feat(web): v2 看板前端接入真实数据接口
前端样式完全沿用 2.0 设计稿,仅替换数据来源。

- templates/index.html 改用设计稿 DOM 结构与类名,引用 styles.css + weapi.js + app.js
- static/css/styles.css 引入 2.0 设计稿样式
- static/js/weapi.js 新增,封装 /api/v2/* 调用为全局 WeApi
- static/js/app.js 重写:保留设计稿全部渲染函数与 CSS 类名,
  数据源由 demo-data.js 静态假数据改为真实接口,
  补充异步加载器、加载/错误状态机与重试按钮
- static/js/demo-data.js 保留为设计稿原始假数据对照
2026-09-11 18:21:06 +08:00
admin a114f3f407 feat(api): 新增微信读书 v2 数据接口层
新建 api_v2.py,以独立 Flask Blueprint 挂载 /api/v2/*,与既有 /api/* 完全隔离,不影响 v1 接口。

- 提供 status / dashboard / shelf / notebooks / notes / book / reviews /
  highlights / underline-thoughts / thought / archives / recommend / search 等接口
- 进程内 TTL 缓存降低接口调用频次;MySQL 不可用时返回 degraded 降级标记
- 阅读状态按 finish_reading / progress / 近 30 天阅读记录综合判定
- 周月维度缺少偏好画像时回退 overall 口径补齐,并标注 preference_source
- app.py 注册 Blueprint;__main__ 端口改为读取 PORT 环境变量
2026-09-11 18:21:06 +08:00
admin e3856ccdcf chore: 忽略 .workbuddy 工作区记忆目录 2026-09-11 18:21:06 +08:00
admin 8e8a0bfba6 feat(web): 移植 2.0 阅读看板探索 Demo 2026-09-11 17:30:10 +08:00
admin f42b114384 docs: 补充 1.0 刷新按钮排查记录 2026-09-11 17:13:25 +08:00
admin 92a48d14cd feat: 添加配置读取工具,支持从环境变量和 .env 文件加载 WEREAD_API_KEY
fix: 修复启动脚本中的 Python 解释器路径识别
style: 更新样式以支持按钮最小宽度和灵活布局
docs: 添加项目最终文档,整合各类信息与说明
2026-07-17 22:11:27 +08:00
admin 3d5a402117 fix(button): 解决按钮高度抖动问题
- 分析发现字符 ↻ 在某些字体下被当作大尺寸字符导致换行
- 修复方案将按钮拆分为图标和文字两层结构
- 使用 inline-flex 布局配合固定高度防止高度变化
- 替换不稳定字符 ↻ 为更稳定的 ⟳ (U+27F3)
- 添加 flex-shrink:0 防止被父容器压缩
- 通过独立选择器控制文字更新保留图标结构
2026-07-17 15:30:48 +08:00
admin 5608562f02 feat: 添加 weread 启停命令 & 修复 macOS SSL 证书问题
- 新增 weread CLI 脚本,支持 weread start/stop [port] 一键管理服务
- app.py 端口改为从环境变量 WEREAD_PORT 读取,默认 8080
- 修复 macOS Python urllib 调用微信读书 API 时 SSL 证书验证失败问题(引入 certifi)
2026-07-17 14:34:35 +08:00
admin c3f5c0ff03 刷新按钮改用 span 结构 + flex 布局,彻底修复高度抖动\n\n问题:\n- width:120px + 字符 ↻ 在某些字体下被当成大尺寸字符渲染\n- 文字强制换行成两行,按钮高度暴涨到 150px+ 变成竖长方形\n\n修复:\n- 改用 ⟳ (U+27F3) 字符,更稳定\n- HTML 结构:<span class="btn-icon">⟳</span><span class="btn-text">刷新</span>\n- CSS 改用 display:inline-flex + align-items:center + justify-content:center\n- 固定 height:36px + padding:0 16px\n- JS 通过 .btn-text 选择器单独更新文字,保留图标 span 2026-07-17 13:28:08 +08:00
admin baeda63646 修复刷新按钮宽度抖动:改用固定 width:120px
- min-width 改为固定 width:120px,容纳最长文案'↻ 同步中...'
- transition 从 all 改为仅 color/border/opacity,避免宽度动画
- 添加 box-sizing:border-box 确保 padding 不撑大按钮
2026-07-17 13:24:13 +08:00
admin 7bc02075bd 刷新按钮支持数据同步:调用 /api/sync 拉取最新数据
- app.py 新增 /api/sync POST 接口:运行 fetch_data.py + migrate_to_mysql.py
- refreshShelf() 先调用 /api/sync 同步数据,再重新加载书架
- 按钮文案三阶段:同步中... → 加载中... → 刷新
- CSS 增加 min-width 防止按钮宽度抖动
- launchd plist 和 start_server.sh 均配置 WEREAD_API_KEY 环境变量
2026-07-17 13:22:19 +08:00
admin e8552a9a4c gitignore: 忽略 .server.pid 2026-07-17 13:15:00 +08:00
admin 8333230f77 添加书架刷新按钮 + 后端服务保活方案
前端:
- 书架筛选栏新增「↻ 刷新」按钮,点击重新加载分类和书架数据
- 新增 refreshShelf() 函数,带 loading 状态反馈
- 新增 .shelf-refresh-btn CSS 样式

后端保活:
- 新增 start_server.sh 启动脚本 (start/daemon/stop/restart/status)
- 新增 com.weread-dashboard.plist launchd 服务配置
  - KeepAlive=true: 崩溃自动重启
  - RunAtLoad=true: 开机自动启动
  - 日志输出到 /tmp/weread_server.log
2026-07-17 13:14:55 +08:00
admin 7d983e38da 书架恢复横向网格展示,移除分类分组标题
- loadShelf 始终用简单网格渲染,不再调用 renderBooksGroupedByCategory
- 删除 renderBooksGroupedByCategory 函数
- 清理 .shelf-group-header / .shelf-group-count CSS 样式
- 后端 sort=category 仍生效(按分类排序),前端不显示分组标题
- 分类筛选标签保留
2026-07-17 12:33:04 +08:00
admin 8b24052ab6 移除分类排序按钮,默认按分类排序展示
- 删除 index.html 中的 shelfSortBtn 按钮
- shelfSortMode 默认改为 category,始终按分类排序
- 删除 toggleShelfSort 函数和 .shelf-sort-btn CSS 样式
- 书架列表默认以分类分组渲染
2026-07-17 12:29:01 +08:00
admin e578a90543 feat: collapsible hierarchical category tags + category sort for shelf
- Backend: add parent_category param (matches '历史-*' sub-categories),
  sort=category mode (ORDER BY category ASC), return category_tree with
  parent→sub→count hierarchy
- Frontend: replace flat 63-tag list with collapsible parent tags showing
  book counts, click parent to expand sub-category pills with fade-in
  animation, click sub to filter to exact category
- Add '分类排序' toggle button: when active, books are grouped by
  category with colored section headers showing category name + count
- Clicking same parent again collapses it; '全部' resets everything
- Mobile responsive: smaller tag sizes, reduced indent on narrow screens
2026-07-17 12:21:36 +08:00
admin ec88707e6b fix: close thoughts page and modal when switching nav tabs
switchTab() now checks if the thoughts detail page or book detail modal
is open and closes them before switching to the target tab. Previously,
when on the thoughts page, clicking any nav tab (charts, ranking, etc.)
would silently fail because mainView was still hidden.
2026-07-17 12:17:10 +08:00
admin 90b9614b5e feat: add search and sort to thoughts detail page
- Search box: real-time filter across highlights, book reviews, and
  thoughts content (mark_text, content, abstract fields)
- Sort dropdown: 3 modes - newest first, oldest first, by chapter order
  (chapter_uid + range position)
- Chapter sort mode groups highlights by chapter with titles
- Time sort mode flattens highlights with chapter labels
- Empty state shows search keyword when no results match
- Mobile responsive: toolbar stacks vertically on narrow screens
2026-07-17 12:16:19 +08:00
admin d276608538 fix: replace weread:// deep link with web URL for 'Open in WeRead' button
The hardcoded 'weread://reading?bId=...' scheme only works on mobile
devices with the WeRead app installed. On desktop browsers, clicking
the button did nothing. Now uses data.deep_link from the API response
(https://weread.qq.com/...) with fallback logic: try weread:// scheme
via hidden iframe for 1.5s, then fall back to opening the web URL.
2026-07-17 12:14:12 +08:00