feat(typesetting): Wave 2 - 流式渲染、表格字号独立控制、作者声明

- 缩略图改为流式渲染,截图一页即显示一页
- 新增tableFontScale独立控制表格字号,含后端持久化
- 内容页顶部添加作者声明(文/作者名),空值隐藏
This commit is contained in:
augushong
2026-05-16 00:35:03 +08:00
committed by Atlas
parent 2b9bfb179f
commit 3ea3a6dbe3
4 changed files with 130 additions and 44 deletions

View File

@@ -20,6 +20,7 @@ class PhoneImage implements PostOutputManagerInterface
'watermark' => ['type' => 'text', 'default' => ''],
'pageAlignments' => ['type' => 'json', 'default' => '{}'],
'fontScale' => ['type' => 'number', 'default' => 1, 'min' => 0.5, 'max' => 2.0],
'tableFontScale' => ['type' => 'number', 'default' => 1, 'min' => 0.5, 'max' => 2.0],
];
}
@@ -45,6 +46,12 @@ class PhoneImage implements PostOutputManagerInterface
return false;
}
}
if (isset($config['tableFontScale'])) {
$scale = floatval($config['tableFontScale']);
if ($scale < 0.5 || $scale > 2.0) {
return false;
}
}
// watermark 是文本类型,无需特殊验证
// pageAlignments 是 JSON 类型,存储时由框架自动序列化