From b0653df37c6c313278fe8ae538dc71e158b21d8b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 9 Sep 2023 17:00:51 +0800 Subject: [PATCH] :art: aria label --- app/appearance/icons/ant/icon.js | 3 +++ app/appearance/icons/index.html | 6 ++++++ app/appearance/icons/material/icon.js | 3 +++ app/src/layout/Wnd.ts | 4 ++-- app/src/menus/navigation.ts | 1 + app/src/protyle/breadcrumb/index.ts | 11 ++++++----- app/src/protyle/gutter/index.ts | 1 + app/src/protyle/header/openTitleMenu.ts | 1 + app/src/protyle/render/av/action.ts | 2 +- 9 files changed, 24 insertions(+), 8 deletions(-) diff --git a/app/appearance/icons/ant/icon.js b/app/appearance/icons/ant/icon.js index 49bc4a19f4f..256e7ff3f7f 100644 --- a/app/appearance/icons/ant/icon.js +++ b/app/appearance/icons/ant/icon.js @@ -1,5 +1,8 @@ document.body.insertAdjacentHTML('afterbegin', ` + + + diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html index 613c8e301ba..8a3ebfc9bf0 100644 --- a/app/appearance/icons/index.html +++ b/app/appearance/icons/index.html @@ -28,6 +28,12 @@

SiYuan

+
+ + + + iconAttr +
diff --git a/app/appearance/icons/material/icon.js b/app/appearance/icons/material/icon.js index 8534e7b4cbc..4118c5fb7ed 100644 --- a/app/appearance/icons/material/icon.js +++ b/app/appearance/icons/material/icon.js @@ -1,5 +1,8 @@ document.body.insertAdjacentHTML('afterbegin', ` + + + diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts index 0583a885aab..97bc887e23d 100644 --- a/app/src/layout/Wnd.ts +++ b/app/src/layout/Wnd.ts @@ -61,9 +61,9 @@ export class Wnd {
    • - + - +
    diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts index b70d570825e..329599ab014 100644 --- a/app/src/menus/navigation.ts +++ b/app/src/menus/navigation.ts @@ -361,6 +361,7 @@ export const initFileMenu = (app: App, notebookId: string, pathString: string, l })); window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.attr, + icon: "iconAttr", click() { fetchPost("/api/block/getDocInfo", { id diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts index 3eefad09c09..b00e7ecb7a8 100644 --- a/app/src/protyle/breadcrumb/index.ts +++ b/app/src/protyle/breadcrumb/index.ts @@ -46,12 +46,12 @@ export class Breadcrumb { '
    '} - + - + - -`; + +`; this.element = element.firstElementChild as HTMLElement; element.addEventListener("click", (event) => { @@ -83,7 +83,7 @@ export class Breadcrumb { event.preventDefault(); event.stopPropagation(); break; - } else if (type === "a") { + } else if (type === "doc") { if (window.siyuan.shiftIsPressed) { fetchPost("/api/block/getDocInfo", { id: protyle.block.rootID @@ -475,6 +475,7 @@ export class Breadcrumb { const isCustomFullWidth = protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH); window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.fullWidth, + icon: "iconDock", type: "submenu", submenu: [{ iconHTML: "", diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 6dc5695bef9..978b9df9af9 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -1475,6 +1475,7 @@ export class Gutter { if (!protyle.disabled) { window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.attr, + icon: "iconAttr", accelerator: window.siyuan.config.keymap.editor.general.attr.custom + "/" + updateHotkeyTip("⇧Click"), click() { openAttr(nodeElement); diff --git a/app/src/protyle/header/openTitleMenu.ts b/app/src/protyle/header/openTitleMenu.ts index 84d8e15bc8d..3f00396383c 100644 --- a/app/src/protyle/header/openTitleMenu.ts +++ b/app/src/protyle/header/openTitleMenu.ts @@ -53,6 +53,7 @@ export const openTitleMenu = (protyle: IProtyle, position: { } window.siyuan.menus.menu.append(new MenuItem({ label: window.siyuan.languages.attr, + icon: "iconAttr", accelerator: window.siyuan.config.keymap.editor.general.attr.custom + "/" + updateHotkeyTip("⇧Click"), click() { openFileAttr(response.data.ial); diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 5c85a570800..7139c7e630f 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -254,7 +254,7 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a }); }); menu.addItem({ - icon: "iconList", + icon: "iconAttr", label: window.siyuan.languages.attr, type: "submenu", submenu: editAttrSubmenu