♻️ Unified marketplace Package Type Model (#17152)

This commit is contained in:
Jeffrey Chen 2026-03-08 11:09:46 +08:00 committed by GitHub
parent ab83e5d987
commit 3cac07dfd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1108 additions and 1919 deletions

View file

@ -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
}