🎨 集市已下载包在配置文件不正确的情况下不应该显示更新按钮 https://github.com/siyuan-note/siyuan/issues/5838

This commit is contained in:
Liang Ding 2022-09-07 12:39:28 +08:00
parent 215c70db23
commit b4d1d20cf2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -134,7 +134,9 @@ func InstalledThemes() (ret []*Theme) {
theme.Author = themeConf["author"].(string)
theme.URL = themeConf["url"].(string)
theme.Version = themeConf["version"].(string)
theme.Modes = make([]string, 0, len(themeConf["modes"].([]interface{})))
for _, mode := range themeConf["modes"].([]interface{}) {
theme.Modes = append(theme.Modes, mode.(string))
}
theme.RepoURL = theme.URL
theme.PreviewURL = "/appearance/themes/" + dirName + "/preview.png"
theme.PreviewURLThumb = "/appearance/themes/" + dirName + "/preview.png"