mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve Recent documents https://github.com/siyuan-note/siyuan/pull/15824
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
a1781ae34d
commit
994bdc06a2
2 changed files with 39 additions and 62 deletions
|
|
@ -35,7 +35,7 @@ func getRecentDocs(c *gin.Context) {
|
|||
}
|
||||
|
||||
// 获取排序参数
|
||||
sortBy := "viewedAt" // 默认按浏览时间排序
|
||||
sortBy := "viewedAt" // 默认按浏览时间排序,openAt:按打开时间排序,closedAt:按关闭时间排序
|
||||
if arg["sortBy"] != nil {
|
||||
sortBy = arg["sortBy"].(string)
|
||||
}
|
||||
|
|
@ -248,7 +248,6 @@ func removeOutlineStorage(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func updateRecentDocViewTime(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
@ -267,7 +266,6 @@ func updateRecentDocViewTime(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func updateRecentDocOpenTime(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
@ -302,4 +300,4 @@ func updateRecentDocCloseTime(c *gin.Context) {
|
|||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue