This commit is contained in:
Liang Ding 2023-04-06 22:28:45 +08:00
parent e9bb0a9a06
commit 0fe6759bde
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -45,13 +45,16 @@ func getChangelog(c *gin.Context) {
return return
} }
if !model.Conf.ShowChangelog { //if !model.Conf.ShowChangelog {
return // return
} //}
changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+"_"+model.Conf.Lang+".md") ver := util.Ver
ver = "2.8.4"
changelogPath := filepath.Join(changelogsDir, "v"+ver+"_"+model.Conf.Lang+".md")
if !gulu.File.IsExist(changelogPath) { if !gulu.File.IsExist(changelogPath) {
changelogPath = filepath.Join(changelogsDir, "v"+util.Ver+".md") changelogPath = filepath.Join(changelogsDir, "v"+ver+".md")
if !gulu.File.IsExist(changelogPath) { if !gulu.File.IsExist(changelogPath) {
logging.LogErrorf("changelog not found: %s", changelogPath) logging.LogErrorf("changelog not found: %s", changelogPath)
return return
@ -64,11 +67,12 @@ func getChangelog(c *gin.Context) {
return return
} }
model.Conf.ShowChangelog = false
luteEngine := lute.New() luteEngine := lute.New()
htmlContent := luteEngine.Markdown("", contentData) htmlContent := luteEngine.Markdown("", contentData)
data["show"] = true data["show"] = true
data["html"] = htmlContent data["html"] = gulu.Str.FromBytes(htmlContent)
ret.Data = data ret.Data = data
} }