Skip to content

feat: Add close button for macOS preference window - #6

Merged
Tkaixiang merged 60 commits into
Tkaixiang:trunkfrom
hubo1989:multiL
Sep 3, 2025
Merged

Tkaixiang merged 60 commits into
Tkaixiang:trunkfrom
hubo1989:multiL

Conversation

@hubo1989

@hubo1989 hubo1989 commented Aug 22, 2025 •

Copy link
Copy Markdown

Summary\n\nThis PR fixes the issue where the preference window on macOS couldn't be closed properly by adding a close button functionality.\n\n## Changes\n\n- Added close button functionality for macOS preference window\n- Fixed window closing behavior in titleBar component\n- Improved user experience on macOS by providing a proper way to close preference windows\n\n## Files Modified\n\n- src/renderer/src/components/titleBar/index.vue: Added close button functionality for preference windows\n\n## Testing\n\n- Tested on macOS development environment\n- Verified that preference window can be opened and closed properly\n- Confirmed that the close button works as expected\n\n## Fixes\n\nFixes the macOS-specific issue where users couldn't close the preference window using standard window controls.

- 修改 preference.vue 中的 showCustomTitleBar 计算属性
- 移除 macOS 系统的限制条件,让 macOS 也显示自定义标题栏
- 确保 macOS 用户可以通过右上角关闭按钮关闭偏好设置窗口
- 创建共享翻译模块支持主进程和渲染进程
- 修改主进程菜单和上下文菜单使用翻译函数
- 更新Vue组件集成翻译系统
- 添加英文和中文翻译文件
- 修复构建和运行时的导入路径问题
- 在主进程和渲染进程中集成共享翻译系统
- 修改菜单模板和上下文菜单使用翻译函数
- 更新构建配置以复制翻译文件到输出目录
- 完善中文翻译文件结构,与英文版本保持一致
- 移除硬编码文本,实现国际化支持
- 修复所有配置文件中的模块顶层t()函数调用问题
- 完善偏好设置中的语言切换功能,支持英文和简体中文
- 更新翻译文件,添加语言选项的完整翻译
- 启用语言选择器,用户可在偏好设置中切换语言
- 优化i18n初始化逻辑,确保翻译功能正常工作
- 补充 zh-CN.json 中 commands 命名空间下的所有翻译键
- 补充 en.json 中 commands 命名空间下的所有翻译键
- 解决 descriptions.js 中翻译键显示问题
- 确保中英文翻译文件的完整性和一致性
- 修复菜单栏语言切换实时更新功能
- 实现系统语言自动检测和默认语言回退逻辑
- 修复快捷键描述翻译问题
- 完成exportSettings组件国际化
- 将vue-i18n添加到依赖中
- 修复Linux版本图标问题
- 创建icons目录并配置构建文件
- 成功构建所有平台版本(macOS/Windows/Linux)
- 更新语言选项配置支持全部9种语言(en, zh-CN, zh-TW, es, fr, de, ja, ko, pt)
- 为所有语言文件添加完整的语言选项翻译
- 测试验证多语言切换功能正常工作
- 移除页面上误导用户的 brew install picgo 安装命令
- 修复渲染进程中翻译显示键名的问题,改为直接导入JSON翻译文件
- 确保生产环境中翻译功能正常工作
- 在所有语言翻译文件中添加缺失的命令面板翻译键
- 修复命令文件中的i18n导入路径错误
- 确保命令面板中的所有命令都能正确显示翻译文本
- 修复主进程和渲染进程语言设置不一致问题
- 程序初始化时使用系统语言,不支持时回退到英语
- 修复i18nCSS类翻译函数传递问题
- 修复frontMenu等UI组件的翻译显示
- 添加语言变化事件监听机制
- 为--ag-*系列CSS变量添加引号包围翻译文本
- 确保CSS变量能正确显示翻译内容而非空字符串
- 修复test-i18n.html测试页面中的翻译显示问题
- 添加 i18nCSS 类的正确初始化逻辑
- 导入翻译函数 t 并传递给 i18nCSS 构造函数
- 修改测试流程,确保在测试前先初始化 i18nCSS
- 添加错误处理和调试日志
- 在构造函数中添加翻译函数类型和测试调用的日志
- 在 updateCSSVariables 中添加翻译结果的详细输出
- 便于调试CSS变量显示键名而非翻译文本的问题
- Align Traditional Chinese translations with Simplified Chinese
- Align other language translations with English
- Add missing editor-related translation keys to all language files
- Fix translation key format from camelCase to kebab-case in i18nCSS.js
- 在Selection类的getCursorRange方法中添加空值检查,防止访问null的parentNode属性
- 在importSelection和importSelectionMoveCursorPastAnchor方法中添加空值检查
- 修复图片容器处理中的parentNode访问问题
- 移除所有调试相关的临时文件和脚本
- 清理翻译文件中的editor根节点冲突问题
- 将所有翻译文件中的@符号改为{'@'}格式以避免intlify编译错误
- 在zh-CN.json和en.json中添加根级别的edit命名空间
- 修复typeAtToInsert和type-at-to-insert两个键的@符号问题
- 解决控制台中的翻译键找不到警告
@hubo1989
hubo1989 requested a review from Tkaixiang September 2, 2025 06:51
@hubo1989

hubo1989 commented Sep 2, 2025

Copy link
Copy Markdown
Author

好的,之前的问题,我都整理提交了,请您有空审核下

Comment thread .github/workflows/release.yml Resolved
Comment thread .vscode/extensions.json Resolved
Comment thread build/THIRD-PARTY-LICENSES.txt Resolved
Comment thread package.json Resolved
Comment thread electron-builder.yml Resolved
Comment thread src/renderer/index.html Resolved
- Add translations for themes: cadmiumLight, graphiteLight, materialDark, oneDark, ulyssesLight
- Add translations for paper sizes: A3, A4, A5, Legal, Letter, Tabloid, Liber
- Add translations for image services: GitHub, SM.MS, Imgur, PicGo
- Add translations for diagram types: PlantUML, Mermaid, Vega, KaTeX, MathJax
- Add translations for UI elements: Tweet, OK, HTML
- Add translations for line endings: CRLF, LF
- Add translations for about dialog: title, marktext
- Fix preferences categories and other missing translations
- Add PicGo install commands for npm/yarn/pnpm
- Add GitHub token translation
- Add PicGo settings title
- Add delimiter translations for front matter, math, diagrams
- Add code fence translation
- Fixed 326 empty string values in 8 language files
- Filled with corresponding English translations:
  - Theme names (Cadmium Light, One Dark, etc.)
  - Paper sizes (A3, A4, A5, Legal, etc.)
  - Image services (GitHub, SM.MS, Imgur, PicGo)
  - Diagram types (PlantUML, Mermaid, KaTeX)
  - UI elements (Zoom, OK, HTML, Tweet)
  - Language options in dropdown
  - Preferences categories and titles
  - Editor settings and commands
  - Export and import settings
  - Quick insert hints and tooltips
- All locale files now have complete translations without empty values
- 在 preload 中增加对 macOS 常见 PicGo 安装路径的直接检查
- 扩展 resolvePicgoBinary 函数的候选路径列表
- 解决生产环境 PATH 环境变量受限导致的检测失败问题

@Tkaixiang Tkaixiang left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢您的努力,这些事我最后的评论。只是请您注意一下如果不是错误的话,console.log 因该不太需要,我地下指出了一些列入。

完成了就能在您准备好了才合并。😀

Comment thread package.json Resolved
@Tkaixiang
Tkaixiang merged commit 3635d55 into Tkaixiang:trunk Sep 3, 2025
Comment thread .env.local

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些是真的吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants