Add plugin 窗口置顶 v1.0.0#192
Draft
evanwen97-ops wants to merge 2 commits into
Draft
Conversation
- feat: TopWindow plugin v1.0.0 - Windows window always-on-top toggle - fix: add title field to plugin.json for CLI publish
There was a problem hiding this comment.
Code Review
This pull request introduces the topwindow plugin for ZTools, which allows users to toggle the 'Always on Top' status of the active window on Windows systems. The implementation uses a PowerShell script to interface with Win32 APIs via C# interop. The review feedback focuses on improving the robustness of the plugin by handling edge cases in window title parsing, enhancing error diagnostics by capturing stderr from the child process, and ensuring correct character encoding for non-ASCII window titles.
Comment on lines
+34
to
+36
| const parts = output.split('||'); | ||
| const action = parts[0] || ''; | ||
| const title = parts[1] || ''; |
There was a problem hiding this comment.
Comment on lines
+26
to
+30
| if (error) { | ||
| console.error('TopWindow exec error:', error.message); | ||
| try { | ||
| window.ztools.showNotification('TopWindow 执行失败: ' + error.message); | ||
| } catch (e) { /* ignore */ } |
| @@ -0,0 +1,54 @@ | |||
| $code = @' | |||
Contributor
- feat: TopWindow plugin v1.0.0 - Windows window always-on-top toggle - fix: add title field to plugin.json for CLI publish - feat: 透明背景logo + 添加win32平台标识 + 重新打包 - chore: 添加构建产物plugin.json - docs: 添加CHANGELOG.md - chore: 将build目录加入gitignore并从git中移除
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.

插件信息
本次变更
截图 / 演示
自检清单
plugins/topwindow/目录此 PR 由 ztools-plugin-cli 自动管理:每次
ztools publish在分支上追加一个 commit,PR 链接保持不变。