导出 HTML 适配移动端 - #113
Open
Double-Cloth wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 聚焦于 HTML 离线导出页面的移动端适配,通过补充移动端专用布局 CSS 与少量结构性 HTML 标记,使导出页在窄屏/刘海屏(safe-area)场景下避免内容被遮挡或显示不全。
Changes:
- 新增
_MOBILE_EXPORT_CSS并纳入导出 CSS bundle,提供窄屏下的会话列表/工具栏切换、100dvh 与 safe-area 适配等样式。 - 导出页
index.html与会话页messages.html的 viewport meta 增加viewport-fit=cover,并为移动端交互补充必要的 DOM 结构(checkbox toggle + label)。 - 新增/增强测试用例,校验移动端 CSS 合同(关键选择器与 safe-area/dvh)以及导出运行时 JS 的字节级不变性。
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_chat_export_html_format.py | 增加移动端样式与导出 HTML 结构的回归断言,并新增运行时 payload 不变性测试。 |
| src/wechat_decrypt_tool/chat_export_service.py | 引入移动端导出 CSS、更新导出 HTML 结构与 viewport,并确保导出运行时 JS 严格保持原样。 |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
截图我看看移动端效果 |
Author
Member
|
所有都适配了吗 |
Author
|
聊天记录和收藏的导出都适配了。其他像朋友圈,转账什么的本来就支持移动端 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


优化导出 HTML 的移动端适配,防止内容显示不全