🎨 Add two shortcuts for block navigation https://github.com/siyuan-note/siyuan/issues/11193

This commit is contained in:
Daniel 2024-04-30 21:33:50 +08:00
parent 8650ac464c
commit cf187dddce
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 24 additions and 21 deletions

View file

@ -29,7 +29,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func getParentNextChildID(c *gin.Context) {
func getBlockSiblingID(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
@ -39,8 +39,11 @@ func getParentNextChildID(c *gin.Context) {
}
id := arg["id"].(string)
parent, previous, next := model.GetBlockSiblingID(id)
ret.Data = map[string]string{
"id": model.GetParentNextChildID(id),
"parent": parent,
"next": next,
"previous": previous,
}
}