docs(readme,docs,website): README 精简为展示页,说明移入 docs/reference.md,重采实机截图

README 从 1465 行的「产品说明书 + 验收对照表」改成门面页:居中头部 + 徽章 + 功能清单 +
实机截图 + 怎么装,细节外链到文档站与 docs/reference.md。原全文整份移入
docs/reference.md(不是删除),路径引用按新位置修正。

一并带上:

- docs 目录重组:production / mysql / linux-deploy → management/,winisland-design-tokens
  → dev/(引用同步)
- 新增 docs/images/:README 的展示图,全部是脚本把程序真的跑起来截的,不是示意图
- website/assets/shots/ 同步重采(旧图里是冒烟测试残条,如「联动页也不该下发」)
- capture-shots.mjs 支持 CAPTURE_OUT(逗号分隔多目录),一次采集同时喂官网与 README
- 修:种子作业没写 assignDate —— seed 直接走 prisma.create,绕过了 service 里
  `assignDate ?? 今天` 的兜底,落成 schema 默认值空串,按天查看与日期高亮因此全是空的
- 修:客户端留档截图硬编码了作业日期,种子一重播就截成空看板
- AGENTS.md 同步:README 定位改为门面页,权威口径指向 docs/reference.md
This commit is contained in:
LoveChengke committed 2026-10-06 16:26:41 +08:00
1 parent 580f5bed16
commit 5b002a4f0b
60 files changed
+1799 -1446

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

+22 -9
View File
@@ -1,8 +1,8 @@
/**
* 给官网采集 **真实运行** 的实机截图。
* 给官网与 README 采集 **真实运行** 的实机截图。
*
* 复用仓库里已安装的 Electron(不需要额外依赖),真的打开 Web 管理端、真的登录、
* 逐页截屏落到 website/assets/shots/。不是手绘的示意,也不是旧版本的残留图。
* 逐页截屏落到 website/assets/shots/(或 CAPTURE_OUT 指定的目录)。不是手绘的示意,也不是旧版本的残留图。
*
* 用法:
* 1) 先把后端跑起来(它同时托管 Web 管理端):pnpm dev:server
@@ -12,6 +12,7 @@
* CAPTURE_URL 默认 http://127.0.0.1:4000
* CAPTURE_USER / CAPTURE_PASS 默认 admin / admin123
* CAPTURE_ONLY 只截某几页(逗号分隔的 name)
* CAPTURE_OUT 输出目录(逗号分隔多个,相对仓库根);默认 website/assets/shots
*/
import { spawn } from 'node:child_process';
@@ -22,7 +23,15 @@ import { resolveElectronEnv, resolveElectronExecutable } from '../../scripts/lib
const here = path.dirname(fileURLToPath(import.meta.url));
const root = path.resolve(here, '..', '..');
const outDir = path.join(root, 'website', 'assets', 'shots');
/**
* 输出目录。默认只写官网那一份;`CAPTURE_OUT` 可以用逗号分隔指定多个(相对仓库根),
* 例如一次同时喂官网与 README 的展示图:`CAPTURE_OUT=docs/images,website/assets/shots`。
*/
const outDirs = (process.env.CAPTURE_OUT ?? 'website/assets/shots')
.split(',')
.map((dir) => dir.trim())
.filter(Boolean)
.map((dir) => path.resolve(root, dir));
const BASE = process.env.CAPTURE_URL ?? 'http://127.0.0.1:4000';
const USER = process.env.CAPTURE_USER ?? 'admin';
@@ -168,13 +177,17 @@ async function main(app, BrowserWindow) {
const [contentW, contentH] = win.getContentSize();
// 2 倍渲染 → 缩到目标宽度:文字边缘比直接 1 倍清晰一档
const scaled = image.getSize().width > width ? image.resize({ width, quality: 'best' }) : image;
fs.mkdirSync(outDir, { recursive: true });
const file = path.join(outDir, `${name}.jpg`);
fs.writeFileSync(file, scaled.toJPEG(90));
const kb = (fs.statSync(file).size / 1024).toFixed(0);
const jpeg = scaled.toJPEG(90);
const written = [];
for (const dir of outDirs) {
fs.mkdirSync(dir, { recursive: true });
const file = path.join(dir, `${name}.jpg`);
fs.writeFileSync(file, jpeg);
written.push(`${path.relative(root, file)} ${(jpeg.length / 1024).toFixed(0)}KB`);
}
console.log(
` ${name.padEnd(22)} ${scaled.getSize().width}×${scaled.getSize().height} ${kb}KB ` +
`(窗口内容 ${contentW}×${contentH}, 截图 ${image.getSize().width}×${image.getSize().height})`,
` ${name.padEnd(22)} ${scaled.getSize().width}×${scaled.getSize().height} ` +
`${written.join(' | ')} (窗口内容 ${contentW}×${contentH}, 截图 ${image.getSize().width}×${image.getSize().height})`,
);
}