mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 Windows/macOS add a option Settings - About - Access authorization code - Follow system lock screen https://github.com/siyuan-note/siyuan/issues/9087
This commit is contained in:
parent
300958670a
commit
4ddef21aa6
2 changed files with 17 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||
|
||||
ginServer.Handle("POST", "/api/system/getEmojiConf", model.CheckAuth, getEmojiConf)
|
||||
ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, model.CheckReadonly, setAccessAuthCode)
|
||||
ginServer.Handle("POST", "/api/system/setFollowSystemLockScreen", model.CheckAuth, model.CheckReadonly, setFollowSystemLockScreen)
|
||||
ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, model.CheckReadonly, setNetworkServe)
|
||||
ginServer.Handle("POST", "/api/system/setUploadErrLog", model.CheckAuth, model.CheckReadonly, setUploadErrLog)
|
||||
ginServer.Handle("POST", "/api/system/setAutoLaunch", model.CheckAuth, model.CheckReadonly, setAutoLaunch)
|
||||
|
|
|
|||
|
|
@ -281,6 +281,22 @@ func setAccessAuthCode(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
func setFollowSystemLockScreen(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
lockScreenMode := int(arg["lockScreenMode"].(float64))
|
||||
|
||||
model.Conf.System.LockScreenMode = lockScreenMode
|
||||
model.Conf.Save()
|
||||
return
|
||||
}
|
||||
|
||||
func getSysFonts(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue