Skip to content

feat: 支持插件内获取及订阅主题相关信息#415

Merged
lzx8589561 merged 1 commit intoZToolsCenter:mainfrom
Particaly:feature/plugin-theme-info-support
Apr 14, 2026
Merged

feat: 支持插件内获取及订阅主题相关信息#415
lzx8589561 merged 1 commit intoZToolsCenter:mainfrom
Particaly:feature/plugin-theme-info-support

Conversation

@Particaly
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a theme synchronization mechanism to notify plugins of changes in theme settings, including dark mode, primary colors, and window material. It introduces new APIs in the preload script and broadcasting logic in the main process to ensure all plugin views stay updated. A review comment suggests refactoring redundant broadcasting logic in internal.ts to utilize existing methods in windowManager for better maintainability.

detachedWindowManager.broadcastToAllWindows('update-primary-color', data)

// 通知插件主题信息变更
windowManager.notifyThemeInfoChanged()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

此处的广播逻辑(L808-L816)与 windowManager.broadcastPrimaryColor 方法中的逻辑重复。为了提高代码的可维护性并避免冗余,建议将该代码块重构为直接调用 windowManager.broadcastPrimaryColor(primaryColor, customColor)

@lzx8589561
Copy link
Copy Markdown
Collaborator

image 这块怎么删除了 ?这是我提交的bug修复,需要还原一下

@Particaly
Copy link
Copy Markdown
Collaborator Author

歪日这蠢AI,总在干一些无关的事,昨晚复查了一部分,没想到还有,抱歉抱歉

@Particaly Particaly force-pushed the feature/plugin-theme-info-support branch from 369190f to 810c913 Compare April 14, 2026 01:25
@lzx8589561 lzx8589561 merged commit ed1fd51 into ZToolsCenter:main Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants