Skip to content

Commit f4206b9

Browse files
committed
perf: 调整打开 siyuan://plugins 链接事件的名称 | Adjust the name of the event to open the siyuan://plugins link.
REF: siyuan-note/siyuan#8927
1 parent 4cd7ed1 commit f4206b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import { EditorWindow } from "./editor/window";
6262
import { HandlerType, type IFacadeOptions } from "./facades/facade";
6363

6464
/* 类型 */
65-
import type { IClickBlockIconEvent, IClickEditorContentEvent, IOpenMenuLinkEvent, IOpenSiyuanUrlPluginsEvent } from "@workspace/types/siyuan/events";
65+
import type { IClickBlockIconEvent, IClickEditorContentEvent, IOpenMenuLinkEvent, IOpenSiyuanUrlPluginEvent } from "@workspace/types/siyuan/events";
6666
import type { BlockID } from "@workspace/types/siyuan";
6767

6868
import type {
@@ -290,7 +290,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin {
290290
this.eventBus.on("open-menu-link", this.linkMenuEventListener);
291291

292292
/* 思源 URL */
293-
this.eventBus.on("open-siyuan-url-plugins", this.openSiyuanUrlEventListener);
293+
this.eventBus.on("open-siyuan-url-plugin", this.openSiyuanUrlEventListener);
294294

295295
// /* 快捷键/命令 */
296296
// this.addCommand({
@@ -332,7 +332,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin {
332332
this.eventBus.off("click-editortitleicon", this.blockMenuEventListener);
333333
// this.eventBus.off("open-menu-blockref", this.blockRefMenuEventListener);
334334
this.eventBus.off("open-menu-link", this.linkMenuEventListener);
335-
this.eventBus.off("open-siyuan-url-plugins", this.openSiyuanUrlEventListener);
335+
this.eventBus.off("open-siyuan-url-plugin", this.openSiyuanUrlEventListener);
336336
}
337337

338338
openSetting(): void {
@@ -907,7 +907,7 @@ export default class MonacoEditorPlugin extends siyuan.Plugin {
907907
}
908908

909909
/* 思源 URL 打开事件监听器 */
910-
protected readonly openSiyuanUrlEventListener = async (e: IOpenSiyuanUrlPluginsEvent) => {
910+
protected readonly openSiyuanUrlEventListener = async (e: IOpenSiyuanUrlPluginEvent) => {
911911
// this.logger.debug(e);
912912
const url = new URL(e.detail.url);
913913
if (url.pathname.startsWith(`//plugins/${this.name}/workspace/`)) {

0 commit comments

Comments
 (0)