From d21b122429a5ac36a6a07c9584584fc70b11bba9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 23 Sep 2024 09:11:17 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12518 --- app/src/protyle/gutter/index.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index d0c09ce2f..58f7aba4e 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -451,6 +451,7 @@ export class Gutter { } private turnsOneInto(options: { + menuId?: string, id: string, icon: string, label: string, @@ -461,6 +462,7 @@ export class Gutter { level?: number }) { return { + id: options.menuId, icon: options.icon, label: options.label, accelerator: options.accelerator, @@ -477,9 +479,11 @@ export class Gutter { protyle: IProtyle, selectsElement: Element[], type: TTurnIntoOne, - level?: TTurnIntoOneSub + level?: TTurnIntoOneSub, + menuId?: string, }) { return { + id: options.menuId, icon: options.icon, label: options.label, accelerator: options.accelerator, @@ -496,10 +500,12 @@ export class Gutter { selectsElement: Element[], type: TTurnInto, level?: number, - isContinue?: boolean - accelerator?: string + isContinue?: boolean, + accelerator?: string, + menuId?: string, }) { return { + id: options.menuId, icon: options.icon, label: options.label, accelerator: options.accelerator, @@ -1281,7 +1287,10 @@ export class Gutter { }).element); } if (type === "NodeSuperBlock" && !protyle.disabled) { - window.siyuan.menus.menu.append(new MenuItem({id: "separator_cancelSuperBlock", type: "separator"}).element); + window.siyuan.menus.menu.append(new MenuItem({ + id: "separator_cancelSuperBlock", + type: "separator" + }).element); window.siyuan.menus.menu.append(new MenuItem({ id: "cancelSuperBlock", label: window.siyuan.languages.cancel + " " + window.siyuan.languages.superBlock,