mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 07:02:33 +01:00
🎨 数据历史文档和资源文件支持分页和搜索 https://github.com/siyuan-note/siyuan/issues/4901
This commit is contained in:
parent
710b2d633c
commit
07e74577ff
3 changed files with 34 additions and 2 deletions
|
|
@ -611,7 +611,7 @@ func GetHistoryDir(suffix string) (ret string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func indexHistory() {
|
||||
func ReindexHistory() (err error) {
|
||||
historyDirs, err := os.ReadDir(util.HistoryDir)
|
||||
if nil != err {
|
||||
logging.LogErrorf("read history dir [%s] failed: %s", util.HistoryDir, err)
|
||||
|
|
@ -630,6 +630,7 @@ func indexHistory() {
|
|||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var validOps = []string{HistoryOpClean, HistoryOpUpdate, HistoryOpDelete, HistoryOpFormat}
|
||||
|
|
@ -713,7 +714,7 @@ func indexHistoryDir(name string, luteEngine *lute.Lute) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func fullTextSearchHistory(query string, page int) (ret []*History, matchedBlockCount, matchedRootCount int) {
|
||||
func FullTextSearchHistory(query string, page int) (ret []*History) {
|
||||
query = gulu.Str.RemoveInvisible(query)
|
||||
query = stringQuery(query)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue