Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(client): window_menu and system_tray_menu #1031

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

RSS1102
Copy link
Collaborator

@RSS1102 RSS1102 commented Jan 22, 2025

  • chore: use yarn package tools

之前每次改变菜单栏语言都使用函数重新实例化一次 window menu 这样的方式是错误的,所以又重新修改了一次。

  • 目前 window menu 和 system tary menu 的语言改变没有进行联动,之前使用 lazy_static 进行声明全局常量,但是对于实现的代码复用性不强,后面可能会使用 专门的本地缓存工具、或者小型本地数据库依赖,进行储存和控制全局配置。
    • 全局储存配置,主进程内随时可读。
    • 监听订阅,数据改变时能通知到其他地方。
    • size 尽量要小。

@RSS1102 RSS1102 merged commit b07f50e into Tencent:dev Jan 22, 2025
2 checks passed
@RSS1102 RSS1102 deleted the refactor/client/menu branch January 22, 2025 20:37
RSS1102 added a commit to RSS1102/cherry-markdown that referenced this pull request Feb 6, 2025
* refactor: `yarn` monorepo (Tencent#1025)

* refactor: use `yarn` create monorepo

* chore: pause workflows ci

* fix: 修正lock文件 (#2)

Co-authored-by: yuxuanxia <[email protected]>

* 移除 dist 文件夹 和 vscodePlugin 的  `@types/mocha` deps

* chore: gitignore `dist`

* 移动 commitizen

* chore: remove `example/react-demo` 修复 cherry-markdown 打包问题

* chore: 移动公共依赖

* chore: 移动提交代码检测依赖

* 同步代码

* chore: 修正版本号

* chore: 修改 engines node 限制

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>

* refactor(client): `window_menu` and `system_tray_menu` (Tencent#1031)

chore: use yarn package tools

* fix: monorepo `cherry-markdown` local link (Tencent#1032)

* feat: support monorepo vscodePlugin (Tencent#1034)

- cherry-markdown 下的 `ts-node` 似乎没有被使用,移除后仍可以正常运行,则将其移除,  请 @sunsonliu 确认是否有问题。

- 使用脚本在 cherry-markdown build 之后 运行一个脚本将打包后的 dist 文件自动复制到 `packages/vscodePlugin/web-resources` 文件下实现资源的热更新(移除了之前的资源 `web-resources/dist` )。
- vscodePlugin 的 `publisher` 改为 `CherryMarkdown` ,包名改为 `@cherry-markdown/vscode-plugin` , Extensions 搜索列表展示名改为 `Cherry Markdown` (注意:该改动将会重新发布一个新的 CherryMarkdown vscodePlugin,之前的包将会被废弃,但是统一了品牌,另 yarn 的 monorepo workspaces 下的项目不能有重名的 `name`) 请 @sunsonliu 确认。
- 在 vscodePlugin 项目下添加 `.yarnrc` 配置文件,并配置 `ignore-engines true` 是为了解决 不能识别 vscodePlugin 的自定义引擎字段 `engines`。

- 将 client 的 `tauri` 相关依赖版本进行固定以防止 tauri plugin 和 tauri 不一致导致意外的错误。
- 修改了在 main scripts 下的 client 相关脚本,只保留对于 tauri client 相关的操作脚本。

* chore: update `husky` hook config and add `commitlint` support (Tencent#1035)

chore: remove unnecessary hooks  and deps

* feat: add changesets (Tencent#1036)

* chore(exmample): add react demo for cherry-markdown (Tencent#1037)

* chore: add react demo

* chore: 更新react demo 链接

* chore: the packages will be made available on the public registry (Tencent#1039)

* feat: add changeset ci

* chore: 修改 vscode plugin

* chore: ci

* chore: 更新 ci

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>
RSS1102 added a commit to RSS1102/cherry-markdown that referenced this pull request Feb 6, 2025
* refactor: `yarn` monorepo (Tencent#1025)

* refactor: use `yarn` create monorepo

* chore: pause workflows ci

* fix: 修正lock文件 (#2)

Co-authored-by: yuxuanxia <[email protected]>

* 移除 dist 文件夹 和 vscodePlugin 的  `@types/mocha` deps

* chore: gitignore `dist`

* 移动 commitizen

* chore: remove `example/react-demo` 修复 cherry-markdown 打包问题

* chore: 移动公共依赖

* chore: 移动提交代码检测依赖

* 同步代码

* chore: 修正版本号

* chore: 修改 engines node 限制

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>

* refactor(client): `window_menu` and `system_tray_menu` (Tencent#1031)

chore: use yarn package tools

* fix: monorepo `cherry-markdown` local link (Tencent#1032)

* feat: support monorepo vscodePlugin (Tencent#1034)

- cherry-markdown 下的 `ts-node` 似乎没有被使用,移除后仍可以正常运行,则将其移除,  请 @sunsonliu 确认是否有问题。

- 使用脚本在 cherry-markdown build 之后 运行一个脚本将打包后的 dist 文件自动复制到 `packages/vscodePlugin/web-resources` 文件下实现资源的热更新(移除了之前的资源 `web-resources/dist` )。
- vscodePlugin 的 `publisher` 改为 `CherryMarkdown` ,包名改为 `@cherry-markdown/vscode-plugin` , Extensions 搜索列表展示名改为 `Cherry Markdown` (注意:该改动将会重新发布一个新的 CherryMarkdown vscodePlugin,之前的包将会被废弃,但是统一了品牌,另 yarn 的 monorepo workspaces 下的项目不能有重名的 `name`) 请 @sunsonliu 确认。
- 在 vscodePlugin 项目下添加 `.yarnrc` 配置文件,并配置 `ignore-engines true` 是为了解决 不能识别 vscodePlugin 的自定义引擎字段 `engines`。

- 将 client 的 `tauri` 相关依赖版本进行固定以防止 tauri plugin 和 tauri 不一致导致意外的错误。
- 修改了在 main scripts 下的 client 相关脚本,只保留对于 tauri client 相关的操作脚本。

* chore: update `husky` hook config and add `commitlint` support (Tencent#1035)

chore: remove unnecessary hooks  and deps

* feat: add changesets (Tencent#1036)

* chore(exmample): add react demo for cherry-markdown (Tencent#1037)

* chore: add react demo

* chore: 更新react demo 链接

* chore: the packages will be made available on the public registry (Tencent#1039)

* feat: add changeset ci

* chore: 修改 vscode plugin

* chore: ci

* chore: 更新 ci

* chore: 更新 ci commit

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>
RSS1102 added a commit to RSS1102/cherry-markdown that referenced this pull request Feb 6, 2025
* refactor: `yarn` monorepo (Tencent#1025)

* refactor: use `yarn` create monorepo

* chore: pause workflows ci

* fix: 修正lock文件 (#2)

Co-authored-by: yuxuanxia <[email protected]>

* 移除 dist 文件夹 和 vscodePlugin 的  `@types/mocha` deps

* chore: gitignore `dist`

* 移动 commitizen

* chore: remove `example/react-demo` 修复 cherry-markdown 打包问题

* chore: 移动公共依赖

* chore: 移动提交代码检测依赖

* 同步代码

* chore: 修正版本号

* chore: 修改 engines node 限制

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>

* refactor(client): `window_menu` and `system_tray_menu` (Tencent#1031)

chore: use yarn package tools

* fix: monorepo `cherry-markdown` local link (Tencent#1032)

* feat: support monorepo vscodePlugin (Tencent#1034)

- cherry-markdown 下的 `ts-node` 似乎没有被使用,移除后仍可以正常运行,则将其移除,  请 @sunsonliu 确认是否有问题。

- 使用脚本在 cherry-markdown build 之后 运行一个脚本将打包后的 dist 文件自动复制到 `packages/vscodePlugin/web-resources` 文件下实现资源的热更新(移除了之前的资源 `web-resources/dist` )。
- vscodePlugin 的 `publisher` 改为 `CherryMarkdown` ,包名改为 `@cherry-markdown/vscode-plugin` , Extensions 搜索列表展示名改为 `Cherry Markdown` (注意:该改动将会重新发布一个新的 CherryMarkdown vscodePlugin,之前的包将会被废弃,但是统一了品牌,另 yarn 的 monorepo workspaces 下的项目不能有重名的 `name`) 请 @sunsonliu 确认。
- 在 vscodePlugin 项目下添加 `.yarnrc` 配置文件,并配置 `ignore-engines true` 是为了解决 不能识别 vscodePlugin 的自定义引擎字段 `engines`。

- 将 client 的 `tauri` 相关依赖版本进行固定以防止 tauri plugin 和 tauri 不一致导致意外的错误。
- 修改了在 main scripts 下的 client 相关脚本,只保留对于 tauri client 相关的操作脚本。

* chore: update `husky` hook config and add `commitlint` support (Tencent#1035)

chore: remove unnecessary hooks  and deps

* feat: add changesets (Tencent#1036)

* chore(exmample): add react demo for cherry-markdown (Tencent#1037)

* chore: add react demo

* chore: 更新react demo 链接

* chore: the packages will be made available on the public registry (Tencent#1039)

* feat: add changeset ci

* chore: 修改 vscode plugin

* chore: ci

* chore: 更新 ci

* chore: 更新 ci commit

* chore: remove ` version: yarn bump`

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>
RSS1102 added a commit to RSS1102/cherry-markdown that referenced this pull request Feb 6, 2025
* refactor: `yarn` monorepo (Tencent#1025)

* refactor: use `yarn` create monorepo

* chore: pause workflows ci

* fix: 修正lock文件 (#2)

Co-authored-by: yuxuanxia <[email protected]>

* 移除 dist 文件夹 和 vscodePlugin 的  `@types/mocha` deps

* chore: gitignore `dist`

* 移动 commitizen

* chore: remove `example/react-demo` 修复 cherry-markdown 打包问题

* chore: 移动公共依赖

* chore: 移动提交代码检测依赖

* 同步代码

* chore: 修正版本号

* chore: 修改 engines node 限制

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>

* refactor(client): `window_menu` and `system_tray_menu` (Tencent#1031)

chore: use yarn package tools

* fix: monorepo `cherry-markdown` local link (Tencent#1032)

* feat: support monorepo vscodePlugin (Tencent#1034)

- cherry-markdown 下的 `ts-node` 似乎没有被使用,移除后仍可以正常运行,则将其移除,  请 @sunsonliu 确认是否有问题。

- 使用脚本在 cherry-markdown build 之后 运行一个脚本将打包后的 dist 文件自动复制到 `packages/vscodePlugin/web-resources` 文件下实现资源的热更新(移除了之前的资源 `web-resources/dist` )。
- vscodePlugin 的 `publisher` 改为 `CherryMarkdown` ,包名改为 `@cherry-markdown/vscode-plugin` , Extensions 搜索列表展示名改为 `Cherry Markdown` (注意:该改动将会重新发布一个新的 CherryMarkdown vscodePlugin,之前的包将会被废弃,但是统一了品牌,另 yarn 的 monorepo workspaces 下的项目不能有重名的 `name`) 请 @sunsonliu 确认。
- 在 vscodePlugin 项目下添加 `.yarnrc` 配置文件,并配置 `ignore-engines true` 是为了解决 不能识别 vscodePlugin 的自定义引擎字段 `engines`。

- 将 client 的 `tauri` 相关依赖版本进行固定以防止 tauri plugin 和 tauri 不一致导致意外的错误。
- 修改了在 main scripts 下的 client 相关脚本,只保留对于 tauri client 相关的操作脚本。

* chore: update `husky` hook config and add `commitlint` support (Tencent#1035)

chore: remove unnecessary hooks  and deps

* feat: add changesets (Tencent#1036)

* chore(exmample): add react demo for cherry-markdown (Tencent#1037)

* chore: add react demo

* chore: 更新react demo 链接

* chore: the packages will be made available on the public registry (Tencent#1039)

* feat: add changeset ci

* chore: 修改 vscode plugin

* chore: ci

* chore: 更新 ci

* chore: 更新 ci commit

* chore: remove ` version: yarn bump`

* chore: add release

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>
RSS1102 added a commit to RSS1102/cherry-markdown that referenced this pull request Feb 7, 2025
* refactor: `yarn` monorepo (Tencent#1025)

* refactor: use `yarn` create monorepo

* chore: pause workflows ci

* fix: 修正lock文件 (#2)

Co-authored-by: yuxuanxia <[email protected]>

* 移除 dist 文件夹 和 vscodePlugin 的  `@types/mocha` deps

* chore: gitignore `dist`

* 移动 commitizen

* chore: remove `example/react-demo` 修复 cherry-markdown 打包问题

* chore: 移动公共依赖

* chore: 移动提交代码检测依赖

* 同步代码

* chore: 修正版本号

* chore: 修改 engines node 限制

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>

* refactor(client): `window_menu` and `system_tray_menu` (Tencent#1031)

chore: use yarn package tools

* fix: monorepo `cherry-markdown` local link (Tencent#1032)

* feat: support monorepo vscodePlugin (Tencent#1034)

- cherry-markdown 下的 `ts-node` 似乎没有被使用,移除后仍可以正常运行,则将其移除,  请 @sunsonliu 确认是否有问题。

- 使用脚本在 cherry-markdown build 之后 运行一个脚本将打包后的 dist 文件自动复制到 `packages/vscodePlugin/web-resources` 文件下实现资源的热更新(移除了之前的资源 `web-resources/dist` )。
- vscodePlugin 的 `publisher` 改为 `CherryMarkdown` ,包名改为 `@cherry-markdown/vscode-plugin` , Extensions 搜索列表展示名改为 `Cherry Markdown` (注意:该改动将会重新发布一个新的 CherryMarkdown vscodePlugin,之前的包将会被废弃,但是统一了品牌,另 yarn 的 monorepo workspaces 下的项目不能有重名的 `name`) 请 @sunsonliu 确认。
- 在 vscodePlugin 项目下添加 `.yarnrc` 配置文件,并配置 `ignore-engines true` 是为了解决 不能识别 vscodePlugin 的自定义引擎字段 `engines`。

- 将 client 的 `tauri` 相关依赖版本进行固定以防止 tauri plugin 和 tauri 不一致导致意外的错误。
- 修改了在 main scripts 下的 client 相关脚本,只保留对于 tauri client 相关的操作脚本。

* chore: update `husky` hook config and add `commitlint` support (Tencent#1035)

chore: remove unnecessary hooks  and deps

* feat: add changesets (Tencent#1036)

* chore(exmample): add react demo for cherry-markdown (Tencent#1037)

* chore: add react demo

* chore: 更新react demo 链接

* chore: the packages will be made available on the public registry (Tencent#1039)

* feat: add changeset ci

* chore: 修改 vscode plugin

* chore: ci

* chore: 更新 ci

* chore: 更新 ci commit

* chore: remove ` version: yarn bump`

* chore: add release

* Update config.json

---------

Co-authored-by: Leo Xia <[email protected]>
Co-authored-by: yuxuanxia <[email protected]>
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.

1 participant