augushong
|
1f8128385f
|
refactor(phone-image): wangeditor 排版引擎核心重构
- 两栏布局:取消左侧工具栏,中间改为wangeditor v5编辑器
- 顶部操作栏:设置/保存/生成并保存+更多下拉(历史/重新生成/下载/长图)
- 设置弹框:尺寸选择+水印输入,删除全局字号滑块
- wangeditor完整工具栏+divider分割线标记分页
- 删除旧渲染管线:renderContentFlow/insertPageBreak/removePageBreak/convertFlowBlocksToImages/measureBlockHeights
- 新增captureEditorBlocks:从编辑器DOM测高+按分割线分组+实际高度分页
- 新增exportLongImage:从wangeditor DOM截长图
- getContentHtml改为从wangeditor实例读取
|
2026-05-11 22:45:38 +08:00 |
|
augushong
|
e9d839ae8a
|
docs(phone-image): 产出排版功能架构文档
fix(phone-image): 修复分页标记丢失bug,消除双数据源问题
- 新增 getContentHtml() 和 updateConfig() 引擎API
- 保存逻辑改用引擎内部 content_html,不再从DOM读取
- doRender 改用 updateConfig,配置变更不重置内容
- loadFromHistory 改用 init+render 全量初始化
- PHP/JS 配置字段对齐(移除template/font,新增pageAlignments)
|
2026-05-11 21:17:37 +08:00 |
|
augushong
|
90b4b1d5f2
|
refactor(phone-image): 清理死代码、修复历史记录和媒体标签安全移除
T8: 删除estimateImageHeight/estimateTableHeight/showGeneratedThumbnails/switchSize/
getConfig/getPages/renderContentFlow等未使用函数,exportLongImage添加render锁检查
T9: loadFromHistory恢复pageAlignments,font_size→fontSize命名统一(PHP+JS双向兼容),
修复历史加载时fontSize显示值bug
T10: preprocessContent移除iframe/video/svg/embed/object标签,
封面图添加onerror处理
|
2026-05-07 21:53:03 +08:00 |
|
augushong
|
491a71bd44
|
feat(phone-image): fontSize滑块生效、水印渲染、保存大小检查和空内容提示
T5: 通过JS setProperty动态设置--pi-font-size-base让fontSize滑块真正改变渲染字号,
修复h4标题不使用CSS变量避免被影响
T6: 在封面页/内容页/尾页生成函数中添加水印HTML,CSS添加.page-watermark样式
T7: saveImages添加16MB大小检查,render添加空内容检测提示,
doCapturePages错误路径添加staging清理
|
2026-05-07 21:39:26 +08:00 |
|
augushong
|
9aacfab11d
|
fix(phone-image): 修复XSS注入、正则兼容性、render锁稳定性和缓存清理
T1: XSS修复 - PHP模板注入改用json_encode,poster URL转义处理
T2: fontSize NaN修复 - parseInt统一处理,lookbehind正则替换为兼容方案
T3: render锁稳定性 - insertPageBreak/removePageBreak添加15次重试上限,
fontsReady添加catch处理,_pending递归添加错误捕获
T4: 缓存清理 - init()清空缓存,render()超过3倍blocks数自动清理
|
2026-05-07 21:29:45 +08:00 |
|
augushong
|
e657e37dd4
|
perf(phone-image): 缓存截图数据避免重复html2canvas调用,添加render并发锁
- 新增 convertedBlockCache + simpleHash 缓存已转换的表格/代码块图片
- 首次render截图后缓存,后续调字号/切尺寸/插分页直接复用
- render() 添加 _locked/_pending 并发锁,防止多次渲染同时执行
- insertPageBreak/removePageBreak 加锁检查,渲染中延迟重试
|
2026-05-07 20:30:34 +08:00 |
|
augushong
|
404f4d8a22
|
refactor(phone-image): 在中间栏截图转换表格和代码块为图片,确保渲染一致性
- 新增 convertFlowBlocksToImages():在 #content-flow 中用 html2canvas 截图转换 table/pre 块为 img
- 修改 render() 管线:renderContentFlow -> convertFlowBlocksToImages -> measureBlockHeights
- 删除旧的 convertCodeBlocks() 和 convertTables()(doCapturePages 中不再需要)
- 添加 parseHtmlToBlocks 的 case 'pre' 分支
- splitOversizedBlock 添加 pre 不拆分规则
- isPureImagePage 跳过 data-converted=true 的图片避免误判
|
2026-05-03 23:32:41 +08:00 |
|
augushong
|
2233b2b71a
|
fix(phone-image): 修复代码块/表格转换DOM索引失效bug,增加重新生成按钮和中间栏表格样式
- convertCodeBlocks/convertTables: 改为每次重新find().first()替代缓存索引
- 修复replaceWith后jQuery集合中后续元素DOM引用失效的问题
- 新增'重新生成'按钮,强制重新渲染缩略图
- 新增中间栏content-flow-block表格CSS样式
|
2026-05-03 22:56:34 +08:00 |
|
augushong
|
1d3d935899
|
fix: 修复phone-image截图循环idx参数传递bug导致无限循环
capturePageViaHtml2Canvas函数将idx作为参数传入,.then回调中idx++只修改参数副本而非闭包变量,
导致runCaptureLoop中idx永远为0,截图循环无限重复处理第一页。
改为传递onDone回调函数,在回调中正确修改闭包变量idx。
|
2026-05-03 21:49:53 +08:00 |
|
augushong
|
c51cd8beb5
|
feat(phone-image): add save button and state management
|
2026-05-03 21:16:00 +08:00 |
|
augushong
|
f08957ad7e
|
fix(phone-image): replace estimate-based pagination with DOM-measured heights
|
2026-05-03 21:04:23 +08:00 |
|
augushong
|
2ba48fd58d
|
feat(phone-image): pure image page optimization - use original image instead of screenshot
|
2026-05-03 10:23:39 +08:00 |
|
augushong
|
6cff21d50f
|
feat(phone-image): table-to-image conversion with beautified CSS styles
|
2026-05-03 10:17:34 +08:00 |
|
augushong
|
d35172e14e
|
fix(phone-image): fix blank thumbnail preview - visibility and wrapper
|
2026-05-03 10:07:13 +08:00 |
|
augushong
|
9dc37283a3
|
feat(phone-image): code blocks converted to images via prismjs + html2canvas
|
2026-05-03 09:19:31 +08:00 |
|
augushong
|
f3f209c403
|
refactor(phone-image): thumbnail alignment toggles and saveImages uses staging
|
2026-05-03 09:14:20 +08:00 |
|
augushong
|
8aeda4c518
|
refactor(phone-image): JS engine renders thumbnails via html2canvas
|
2026-05-03 09:08:15 +08:00 |
|
augushong
|
9dce9854c8
|
fix(phone-image): T7 integration fixes
Fix 3 bugs found during Playwright integration testing:
1. Template syntax: {|json_encode|default='{}'} -> PHP native (curly braces parsed as TP6 tags)
2. jQuery event namespace mismatch: off('click.phoneImage') -> off('click') to match on('click')
3. Migration executed on server
All 6 Playwright test scenarios passed: layout, content flow, preview, alignment, font size, toolbar buttons
|
2026-05-02 09:54:59 +08:00 |
|
augushong
|
03e9a30242
|
fix(phone-image): saveImages always sends current content_html
Ensure postData.content_html (modified by break insertions) is sent to server, not the original hidden div content
|
2026-05-02 09:31:07 +08:00 |
|
augushong
|
b53ba68f68
|
feat(phone-image): add content flow, interactive breaks, per-page alignment and long image export
T9: renderContentFlow(), insertPageBreak(), removePageBreak(), renderAlignmentToggles(), exportLongImage()
- Content flow renders blocks to #content-flow with interactive break-inserters
- Page break markers have delete buttons
- Per-page alignment toggle buttons on each content page
- Long image export hides interactive elements before html2canvas capture
- Event delegation with proper unbind/rebind to avoid duplicates
|
2026-05-02 09:24:31 +08:00 |
|
augushong
|
bcd00e32ea
|
refactor(phone-image): Wave 2 - form, controller, JS engine, API updates
T3: Add cover_text textarea to post edit form
T4: Update Post controller - content copy + cover_text passing
T5: Refactor JS engine - remove old APIs, add forced breaks, page numbers, per-page alignment
T8: Add cover_text to API default_fields, apidoc (4 places), AGENTS.md
|
2026-05-02 09:16:05 +08:00 |
|
augushong
|
34fe255829
|
feat(phone-image): 增加翻页预览与无封面图排版样式
- 为手机截图生成器添加翻页功能,支持在生成前预览各页内容
- 增加无封面图时的排版样式,使用装饰线条和居中布局
- 改进图片处理逻辑,清除内联样式并展平嵌套包装元素
- 修复 models.dev 同步接口,支持 GET 请求获取缓存数据
- 优化网络请求,添加直连失败后的本地代理重试机制
|
2026-05-01 16:31:26 +08:00 |
|
augushong
|
83a2bd48a2
|
feat(post): 新增手机图片排版与AI智能排版功能
- 新增手机图片排版功能,支持小红书/抖音尺寸输出
- 新增AI智能排版顾问,支持内容分析与优化推荐
- 新增AI供应商管理,支持多渠道配置与同步
- 新增文章输出管理页面,支持图片预览与批量下载
- 新增字体文件与排版样式配置
|
2026-05-01 12:23:17 +08:00 |
|
augushong
|
3bc46a4b9c
|
初始化项目
|
2020-08-07 23:49:50 +08:00 |
|