diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index f5eb3d516..2f036f003 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -183,6 +183,9 @@ interface INotebook {
closed: boolean
icon: string
sort: number
+ dueFlashcardCount?: string;
+ newFlashcardCount?: string;
+ flashcardCount?: string;
sortMode: number
}
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index 53be41999..1513b15bd 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -175,6 +175,12 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
let html = "";
notebooks.forEach((item) => {
if (!item.closed) {
+ let countHTML = "";
+ if (flashcard) {
+ countHTML = `${item.newFlashcardCount}
+${item.dueFlashcardCount}
+${item.flashcardCount}`;
+ }
html += `
-
@@ -182,6 +188,7 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)}
${escapeHtml(item.name)}
+ ${countHTML}
`;
}
});
@@ -218,9 +225,9 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,
}) => {
let countHTML = "";
if (flashcard) {
- countHTML = `${item.newFlashcardCount}
-${item.dueFlashcardCount}
-${item.flashcardCount}`;
+ countHTML = `${item.newFlashcardCount}
+${item.dueFlashcardCount}
+${item.flashcardCount}`;
}
fileHTML += `
${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)}
@@ -482,11 +489,11 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
response.data.files.forEach((item: IFile) => {
let countHTML = "";
if (flashcard) {
- countHTML = `${item.newFlashcardCount}
-${item.dueFlashcardCount}
-${item.flashcardCount}`;
+ countHTML = `${item.newFlashcardCount}
+${item.dueFlashcardCount}
+${item.flashcardCount}`;
} else if (item.count && item.count > 0) {
- countHTML = `${item.count}`;
+ countHTML = `${item.count}`;
}
fileHTML += `