mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 When the current spaced repetition is completed, supports choose whether to continue https://github.com/siyuan-note/siyuan/issues/7943
This commit is contained in:
parent
fbf6b84a91
commit
a7bc65108e
6 changed files with 17 additions and 7 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"continueReview1": "Continue Review",
|
||||||
|
"continueReview2": "There are still <code class='fn__code'>${count}</code> cards to review, continue?",
|
||||||
"whatsNewInSiYuan": "What's New in SiYuan",
|
"whatsNewInSiYuan": "What's New in SiYuan",
|
||||||
"returnDesktop": "Press back again to desktop",
|
"returnDesktop": "Press back again to desktop",
|
||||||
"enterNew": "Enter to create",
|
"enterNew": "Enter to create",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"continueReview1": "Continuar revisión",
|
||||||
|
"continueReview2": "Todavía hay tarjetas <code class='fn__code'>${count}</code> para revisar, ¿continuar?",
|
||||||
"whatsNewInSiYuan": "Novedades en SiYuan",
|
"whatsNewInSiYuan": "Novedades en SiYuan",
|
||||||
"returnDesktop": "Presiona volver de nuevo al escritorio",
|
"returnDesktop": "Presiona volver de nuevo al escritorio",
|
||||||
"enterNew": "Ingresar para crear",
|
"enterNew": "Ingresar para crear",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"continueReview1": "Continuer la révision",
|
||||||
|
"continueReview2": "Il reste encore des fiches <code class='fn__code'>${count}</code> à examiner, continuer ?",
|
||||||
"whatsNewInSiYuan": "Quoi de neuf dans SiYuan",
|
"whatsNewInSiYuan": "Quoi de neuf dans SiYuan",
|
||||||
"returnDesktop": "Appuyez à nouveau sur le bureau",
|
"returnDesktop": "Appuyez à nouveau sur le bureau",
|
||||||
"enterNew": "Entrez pour créer",
|
"enterNew": "Entrez pour créer",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"continueReview1": "繼續複習",
|
||||||
|
"continueReview2": "還有 <code class='fn__code'>${count}</code> 張卡片待複習,是否繼續?",
|
||||||
"whatsNewInSiYuan": "思源筆記最新變化",
|
"whatsNewInSiYuan": "思源筆記最新變化",
|
||||||
"returnDesktop": "再按一次返回桌面",
|
"returnDesktop": "再按一次返回桌面",
|
||||||
"enterNew": "回車創建",
|
"enterNew": "回車創建",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"continueReview1": "继续复习",
|
||||||
|
"continueReview2": "还有 <code class='fn__code'>${count}</code> 张卡片待复习,是否继续?",
|
||||||
"whatsNewInSiYuan": "思源笔记最新变化",
|
"whatsNewInSiYuan": "思源笔记最新变化",
|
||||||
"returnDesktop": "再按一次返回桌面",
|
"returnDesktop": "再按一次返回桌面",
|
||||||
"enterNew": "回车创建",
|
"enterNew": "回车创建",
|
||||||
|
|
|
||||||
|
|
@ -258,12 +258,12 @@ export const openCardByData = (cardsData: { cards: ICard[], unreviewedCount: num
|
||||||
deckID: selectElement?.value,
|
deckID: selectElement?.value,
|
||||||
notebook: titleElement.getAttribute("data-notebookid"),
|
notebook: titleElement.getAttribute("data-notebookid"),
|
||||||
reviewedCards: blocks
|
reviewedCards: blocks
|
||||||
}, (treeCards) => {
|
}, (result) => {
|
||||||
index = 0;
|
index = 0;
|
||||||
blocks = treeCards.data.cards;
|
blocks = result.data.cards;
|
||||||
if (blocks.length === 0) {
|
if (blocks.length === 0) {
|
||||||
if (treeCards.data.unreviewedCount > 0) {
|
if (result.data.unreviewedCount > 0) {
|
||||||
newRound(countElement, editor, actionElements);
|
newRound(countElement, editor, actionElements, result.data.unreviewedCount);
|
||||||
} else {
|
} else {
|
||||||
allDone(countElement, editor, actionElements);
|
allDone(countElement, editor, actionElements);
|
||||||
}
|
}
|
||||||
|
|
@ -354,12 +354,12 @@ const allDone = (countElement: Element, editor: Protyle, actionElements: NodeLis
|
||||||
actionElements[1].classList.add("fn__none");
|
actionElements[1].classList.add("fn__none");
|
||||||
};
|
};
|
||||||
|
|
||||||
const newRound = (countElement: Element, editor: Protyle, actionElements: NodeListOf<Element>) => {
|
const newRound = (countElement: Element, editor: Protyle, actionElements: NodeListOf<Element>, unreviewedCount: number) => {
|
||||||
countElement.classList.add("fn__none");
|
countElement.classList.add("fn__none");
|
||||||
editor.protyle.element.classList.add("fn__none");
|
editor.protyle.element.classList.add("fn__none");
|
||||||
const emptyElement = editor.protyle.element.nextElementSibling;
|
const emptyElement = editor.protyle.element.nextElementSibling;
|
||||||
emptyElement.innerHTML = `<div>🆕</div>
|
emptyElement.innerHTML = `<div>♻️ ${window.siyuan.languages.continueReview2.replace("${count}", unreviewedCount)}</div>
|
||||||
<button data-type="newround" class="b3-button">Start</button>`;
|
<button data-type="newround" class="b3-button">${window.siyuan.languages.continueReview1}</button>`;
|
||||||
emptyElement.classList.remove("fn__none");
|
emptyElement.classList.remove("fn__none");
|
||||||
actionElements[0].classList.add("fn__none");
|
actionElements[0].classList.add("fn__none");
|
||||||
actionElements[1].classList.add("fn__none");
|
actionElements[1].classList.add("fn__none");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue