From c0f738fcef43f5c72ad07d103ed0913cb8472ea8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 28 Mar 2023 11:41:51 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7797 --- app/src/assets/scss/mobile.scss | 2 +- app/src/card/viewCards.ts | 3 +++ app/src/menus/navigation.ts | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss index c683a4151..90b32477a 100644 --- a/app/src/assets/scss/mobile.scss +++ b/app/src/assets/scss/mobile.scss @@ -36,7 +36,7 @@ } .b3-list-item { - font-size: 18px; + font-size: 16px; line-height: 40px; &__icon { diff --git a/app/src/card/viewCards.ts b/app/src/card/viewCards.ts index 16044ff07..0bc6342e0 100644 --- a/app/src/card/viewCards.ts +++ b/app/src/card/viewCards.ts @@ -168,6 +168,9 @@ const renderViewItem = (blocks: IBlock[], title: string, deckType: string) => { hPath = getNotebookName(item.box) + getDisplayName(Lute.UnEscapeHTMLStr(item.hPath), false); } else { hPath = getDisplayName(Lute.UnEscapeHTMLStr(item.hPath), false).replace("/" + pathArray.join("/"), ""); + if (hPath.startsWith("/")) { + hPath = hPath.substring(1); + } } listHTML += `
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts index 722f0df41..1279a3913 100644 --- a/app/src/menus/navigation.ts +++ b/app/src/menus/navigation.ts @@ -346,7 +346,11 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement: iconHTML: Constants.ZWSP, label: window.siyuan.languages.mgmt, click: () => { - viewCards(id, pathPosix().join(getNotebookName(notebookId), name), "Tree"); + fetchPost("/api/filetree/getHPathByID", { + id + }, (response) => { + viewCards(id, pathPosix().join(getNotebookName(notebookId), response.data), "Tree"); + }); /// #if MOBILE closePanel(); /// #endif