mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +01:00
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:
parent
432634beea
commit
48c354e7de
9 changed files with 30 additions and 5 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/open-spaced-repetition/go-fsrs"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -60,8 +61,20 @@ type Block struct {
|
|||
Created string `json:"created"`
|
||||
Updated string `json:"updated"`
|
||||
|
||||
RiffCardID string `json:"riffCardID"`
|
||||
RiffCardReps uint64 `json:"riffCardReps"`
|
||||
RiffCardID string `json:"riffCardID"`
|
||||
RiffCard *RiffCard `json:"riffCard"`
|
||||
}
|
||||
|
||||
type RiffCard struct {
|
||||
Due time.Time `json:"due"`
|
||||
Reps uint64 `json:"reps"`
|
||||
}
|
||||
|
||||
func GetRiffCard(card *fsrs.Card) *RiffCard {
|
||||
return &RiffCard{
|
||||
Due: card.Due,
|
||||
Reps: card.Reps,
|
||||
}
|
||||
}
|
||||
|
||||
func (block *Block) IsContainerBlock() bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue