From b4d1d20cf2c5914fd84a86f3412f0afc4647b6ef Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 7 Sep 2022 12:39:28 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=9B=86=E5=B8=82=E5=B7=B2=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8C=85=E5=9C=A8=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E4=B8=8D=E5=BA=94=E8=AF=A5=E6=98=BE=E7=A4=BA=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/5838?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/bazaar/theme.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/bazaar/theme.go b/kernel/bazaar/theme.go index 25329ed0d..3fe782251 100644 --- a/kernel/bazaar/theme.go +++ b/kernel/bazaar/theme.go @@ -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"