mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 16:56:10 +01:00
🎨 When deleting a referenced definition block, a pop-up window will prompt the user https://github.com/siyuan-note/siyuan/issues/13396
This commit is contained in:
parent
fe3caaaa6b
commit
5dab0ecdf6
4 changed files with 77 additions and 15 deletions
|
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/open-spaced-repetition/go-fsrs/v3"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/riff"
|
||||
|
|
@ -434,6 +435,21 @@ func getCardsBlocks(cards []riff.Card, page, pageSize int) (blocks []*Block, tot
|
|||
return
|
||||
}
|
||||
|
||||
func getRiffCard(card *fsrs.Card) *RiffCard {
|
||||
due := card.Due
|
||||
if due.IsZero() {
|
||||
due = time.Now()
|
||||
}
|
||||
|
||||
return &RiffCard{
|
||||
Due: due,
|
||||
Reps: card.Reps,
|
||||
Lapses: card.Lapses,
|
||||
State: card.State,
|
||||
LastReview: card.LastReview,
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
// reviewCardCache <cardID, card> 用于复习时缓存卡片,以便支持撤销。
|
||||
reviewCardCache = map[string]riff.Card{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue