baseline: 薪酬逻辑收口到 shared/payroll.js 后的当前全量状态

这是第一个包含完整工作区的提交,也是后续「拆 SFC / 上 Vite」的回滚基线。

此前的提交均为 index.html 单文件历史快照,由 .bak 文件重建。

当前状态(提交前已实测):
- index.html 内联薪酬算法已删除,改调 WHTPayroll
- shared/payroll.js 为唯一薪酬实现,浏览器与 Node 共用
- 对外接口未变:aggregateMonth / isCutEdge / payDayKind 等保留同名薄包装

未入库内容见 .gitignore:依赖、Chrome 验证 profile、验证截图、
运行时 sqlite 数据与日志、时间戳备份、.trash。
This commit is contained in:
OpenClaw Agent
2026-09-05 14:35:00 +08:00
parent 7d48c4ac65
commit 2329955e32
94 changed files with 12770 additions and 237 deletions
+27
View File
@@ -0,0 +1,27 @@
# Cloudflare Workers 部署配置
#
# 用前必做:
# 1. wrangler d1 create work-hours
# → 把输出里的 database_id 填到下面
# 2. npm run cf:migrate # 等价 wrangler d1 execute work-hours --remote --file=./core/schema.sql
# 3. npm run cf:deploy
#
# 注意:Workers 上的 core/api.js 完全不变,只有存储适配器从 node:sqlite 换成 D1。
name = "work-hours-tracker"
main = "worker.js"
compatibility_date = "2025-01-01"
# 静态资源(index.html 等)。目录指向项目根,即 server/ 的上一层。
[assets]
directory = "../"
binding = "ASSETS"
[[d1_databases]]
binding = "DB"
database_name = "work-hours"
database_id = "REPLACE_WITH_YOUR_D1_DATABASE_ID"
[vars]
# "1" 开放注册;留空/删除则只允许在「库里还没有任何用户」时注册首个账号
ALLOW_REGISTER = ""