Show card NextDue to the flashcard management UI (#9621)

* Show RiffCard NextDue to the UI

* Show RiffCard NextDue to the UI

* Show card NextDue to the flashcard management UI
This commit is contained in:
debbbbie 2023-11-10 20:21:56 +08:00 committed by GitHub
parent 432634beea
commit 48c354e7de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 5 deletions

View file

@ -1,3 +1,4 @@
import * as dayjs from "dayjs";
import {Protyle} from "../protyle";
import {fetchPost} from "../util/fetch";
import {Dialog} from "../dialog";
@ -217,7 +218,8 @@ ${unicode2Emoji(item.ial.icon, "b3-list-item__graphic", true)}
<svg><use xlink:href="#iconTrashcan"></use></svg>
</span>
<span class="${(isMobile() || !hPath) ? "fn__none " : ""}b3-list-item__meta b3-list-item__meta--ellipsis" title="${escapeAttr(hPath)}">${escapeHtml(hPath)}</span>
<span aria-label="${window.siyuan.languages.revisionCount}" class="b3-tooltips b3-tooltips__w counter${item.riffCardReps === 0 ? " fn__none" : ""}">${item.riffCardReps}</span>
<span aria-label="${window.siyuan.languages.nextDue}" class="b3-tooltips b3-tooltips__w counter${!item.riffCard?.due ? " fn__none" : ""}">${dayjs(item.riffCard?.due).format("YYYY-MM-DD")}</span>
<span aria-label="${window.siyuan.languages.revisionCount}" class="b3-tooltips b3-tooltips__w counter${item.riffCard?.reps === 0 ? " fn__none" : ""}">${item.riffCard?.reps}</span>
</div>`;
isFirst = false;
} else {

View file

@ -903,7 +903,7 @@ interface IBlockTree {
}
interface IBlock {
riffCardReps?: number // 闪卡复习次数
riffCard?: IRiffCard,
depth?: number,
box?: string;
path?: string;
@ -925,6 +925,11 @@ interface IBlock {
ial: IObject
}
interface IRiffCard {
due?: string;
reps?: number; // 闪卡复习次数
}
interface IModels {
editor: import("../editor").Editor [],
graph: import("../layout/dock/Graph").Graph[],