diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index a56765db2..caff2becc 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -19,13 +19,32 @@ import {resize} from "../protyle/util/resize";
import {setStorageVal} from "../protyle/util/compatibility";
import {focusByRange} from "../protyle/util/selection";
import {updateCardHV} from "./util";
+import {showMessage} from "../dialog/message";
+import {Menu} from "../plugin/Menu";
+import {transaction} from "../protyle/wysiwyg/transaction";
-const genCardCount = (unreviewedNewCardCount: number, unreviewedOldCardCount: number, index = 1) => {
- return `${index}
-/
-${unreviewedNewCardCount}
+const genCardCount = (cardsData: ICardData, allIndex = 0) => {
+ let newIndex = 0;
+ let oldIndex = 0;
+ cardsData.cards.forEach((item, index) => {
+ if (index > allIndex) {
+ return
+ }
+ if (item.state === 0) {
+ newIndex++;
+ } else {
+ oldIndex++;
+ }
+ })
+ return `
+ ${newIndex} /
+ ${cardsData.unreviewedNewCardCount}
+
+
-${unreviewedOldCardCount}`;
+
+ ${oldIndex} /
+ ${cardsData.unreviewedOldCardCount}
+`;
};
export const genCardHTML = (options: {
@@ -39,7 +58,7 @@ export const genCardHTML = (options: {
iconsHTML = `
`;
@@ -49,7 +68,7 @@ export const genCardHTML = (options: {
${window.siyuan.languages.riffCard}
`}
- ${genCardCount(options.cardsData.unreviewedNewCardCount, options.cardsData.unreviewedOldCardCount)}
+ ${genCardCount(options.cardsData)}