mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
229284f929
7 changed files with 20 additions and 10 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",
|
||||
"returnDesktop": "Press back again to desktop",
|
||||
"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",
|
||||
"returnDesktop": "Presiona volver de nuevo al escritorio",
|
||||
"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",
|
||||
"returnDesktop": "Appuyez à nouveau sur le bureau",
|
||||
"enterNew": "Entrez pour créer",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"continueReview1": "繼續複習",
|
||||
"continueReview2": "還有 <code class='fn__code'>${count}</code> 張卡片待複習,是否繼續?",
|
||||
"whatsNewInSiYuan": "思源筆記最新變化",
|
||||
"returnDesktop": "再按一次返回桌面",
|
||||
"enterNew": "回車創建",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"continueReview1": "继续复习",
|
||||
"continueReview2": "还有 <code class='fn__code'>${count}</code> 张卡片待复习,是否继续?",
|
||||
"whatsNewInSiYuan": "思源笔记最新变化",
|
||||
"returnDesktop": "再按一次返回桌面",
|
||||
"enterNew": "回车创建",
|
||||
|
|
|
|||
|
|
@ -265,12 +265,12 @@ export const openCardByData = (cardsData: { cards: ICard[], unreviewedCount: num
|
|||
deckID: selectElement?.value,
|
||||
notebook: titleElement.getAttribute("data-notebookid"),
|
||||
reviewedCards: blocks
|
||||
}, (treeCards) => {
|
||||
}, (result) => {
|
||||
index = 0;
|
||||
blocks = treeCards.data.cards;
|
||||
blocks = result.data.cards;
|
||||
if (blocks.length === 0) {
|
||||
if (treeCards.data.unreviewedCount > 0) {
|
||||
newRound(countElement, editor, actionElements);
|
||||
if (result.data.unreviewedCount > 0) {
|
||||
newRound(countElement, editor, actionElements, result.data.unreviewedCount);
|
||||
} else {
|
||||
allDone(countElement, editor, actionElements);
|
||||
}
|
||||
|
|
@ -361,12 +361,12 @@ const allDone = (countElement: Element, editor: Protyle, actionElements: NodeLis
|
|||
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");
|
||||
editor.protyle.element.classList.add("fn__none");
|
||||
const emptyElement = editor.protyle.element.nextElementSibling;
|
||||
emptyElement.innerHTML = `<div>🆕</div>
|
||||
<button data-type="newround" class="b3-button">Start</button>`;
|
||||
emptyElement.innerHTML = `<div>♻️ ${window.siyuan.languages.continueReview2.replace("${count}", unreviewedCount)}</div>
|
||||
<button data-type="newround" class="b3-button">${window.siyuan.languages.continueReview1}</button>`;
|
||||
emptyElement.classList.remove("fn__none");
|
||||
actionElements[0].classList.add("fn__none");
|
||||
actionElements[1].classList.add("fn__none");
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ func GetNotebookDueFlashcards(boxID string, reviewedCardIDs []string) (ret []*Fl
|
|||
return
|
||||
}
|
||||
|
||||
cards, unreviewdCnt := getDeckDueCards(deck, reviewedCardIDs, treeBlockIDs)
|
||||
cards, unreviewedCnt := getDeckDueCards(deck, reviewedCardIDs, treeBlockIDs)
|
||||
now := time.Now()
|
||||
for _, card := range cards {
|
||||
blockID := card.BlockID()
|
||||
|
|
@ -329,7 +329,7 @@ func GetNotebookDueFlashcards(boxID string, reviewedCardIDs []string) (ret []*Fl
|
|||
if 1 > len(ret) {
|
||||
ret = []*Flashcard{}
|
||||
}
|
||||
unreviewedCount = unreviewdCnt
|
||||
unreviewedCount = unreviewedCnt
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -444,6 +444,7 @@ func getAllDueFlashcards(reviewedCardIDs []string) (ret []*Flashcard, unreviewed
|
|||
now := time.Now()
|
||||
for _, deck := range Decks {
|
||||
cards, unreviewedCnt := getDeckDueCards(deck, reviewedCardIDs, nil)
|
||||
unreviewedCount += unreviewedCnt
|
||||
for _, card := range cards {
|
||||
blockID := card.BlockID()
|
||||
if nil == treenode.GetBlockTree(blockID) {
|
||||
|
|
@ -451,7 +452,6 @@ func getAllDueFlashcards(reviewedCardIDs []string) (ret []*Flashcard, unreviewed
|
|||
}
|
||||
|
||||
ret = append(ret, newFlashcard(card, blockID, deck.ID, now))
|
||||
unreviewedCount += unreviewedCnt
|
||||
}
|
||||
}
|
||||
if 1 > len(ret) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue