mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🔥 Remove Settings - Appearance - Customize the current theme https://github.com/siyuan-note/siyuan/issues/8006
This commit is contained in:
parent
a04905836e
commit
d8f4ed846b
5 changed files with 47 additions and 399 deletions
|
|
@ -439,43 +439,6 @@ func login2faCloudUser(c *gin.Context) {
|
|||
ret.Data = data
|
||||
}
|
||||
|
||||
func getCustomCSS(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
themeName := arg["theme"].(string)
|
||||
customCSS, err := model.ReadCustomCSS(themeName)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
ret.Data = customCSS
|
||||
}
|
||||
|
||||
func setCustomCSS(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
themeName := arg["theme"].(string)
|
||||
css := arg["css"].(map[string]interface{})
|
||||
if err := model.WriteCustomCSS(themeName, css); nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func setEmoji(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue