mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 16:06:13 +01:00
♻️ Unified marketplace Package Type Model (#17152)
This commit is contained in:
parent
ab83e5d987
commit
3cac07dfd9
17 changed files with 1108 additions and 1919 deletions
|
|
@ -97,12 +97,16 @@ func loadThemes() {
|
|||
continue
|
||||
}
|
||||
name := themeDir.Name()
|
||||
themeConf, parseErr := bazaar.ThemeJSON(name)
|
||||
themeConf, parseErr := bazaar.ParsePackageJSON(filepath.Join(util.ThemesPath, name, "theme.json"))
|
||||
if nil != parseErr || nil == themeConf {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, mode := range themeConf.Modes {
|
||||
var modes []string
|
||||
if nil != themeConf.Modes {
|
||||
modes = *themeConf.Modes
|
||||
}
|
||||
for _, mode := range modes {
|
||||
t := &conf.AppearanceTheme{Name: name}
|
||||
if isBuiltInTheme(name) {
|
||||
t.Label = name + Conf.Language(281)
|
||||
|
|
@ -174,7 +178,7 @@ func LoadIcons() {
|
|||
continue
|
||||
}
|
||||
name := iconDir.Name()
|
||||
iconConf, err := bazaar.IconJSON(name)
|
||||
iconConf, err := bazaar.ParsePackageJSON(filepath.Join(util.IconsPath, name, "icon.json"))
|
||||
if err != nil || nil == iconConf {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue