mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 支持关闭 Google Analytics https://github.com/siyuan-note/siyuan/issues/6403
This commit is contained in:
parent
710e703867
commit
0211e15fc9
3 changed files with 5 additions and 5 deletions
|
|
@ -312,7 +312,7 @@ func setGoogleAnalytics(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
googleAnalytics := arg["googleAnalytics"].(bool)
|
googleAnalytics := arg["googleAnalytics"].(bool)
|
||||||
model.Conf.System.GoogleAnalytics = googleAnalytics
|
model.Conf.System.DisableGoogleAnalytics = googleAnalytics
|
||||||
model.Conf.Save()
|
model.Conf.Save()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,9 @@ type System struct {
|
||||||
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
||||||
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
||||||
|
|
||||||
UploadErrLog bool `json:"uploadErrLog"`
|
UploadErrLog bool `json:"uploadErrLog"`
|
||||||
GoogleAnalytics bool `json:"googleAnalytics"`
|
DisableGoogleAnalytics bool `json:"disableGoogleAnalytics"`
|
||||||
DownloadInstallPkg bool `json:"downloadInstallPkg"`
|
DownloadInstallPkg bool `json:"downloadInstallPkg"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSystem() *System {
|
func NewSystem() *System {
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ func InitConf() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if !Conf.System.GoogleAnalytics {
|
if Conf.System.DisableGoogleAnalytics {
|
||||||
logging.LogInfof("user has disabled [Google Analytics]")
|
logging.LogInfof("user has disabled [Google Analytics]")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue