mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 18:56:09 +01:00
🎨 Brand new marketplace UI https://github.com/siyuan-note/siyuan/issues/8181
This commit is contained in:
parent
f5f5a1d428
commit
9e1dbd9b96
8 changed files with 129 additions and 159 deletions
|
|
@ -116,7 +116,7 @@ func loadThemes() {
|
|||
continue
|
||||
}
|
||||
|
||||
modes := themeConf["modes"].([]interface{})
|
||||
modes := themeConf.Modes
|
||||
for _, mode := range modes {
|
||||
if "dark" == mode {
|
||||
Conf.Appearance.DarkThemes = append(Conf.Appearance.DarkThemes, name)
|
||||
|
|
@ -127,12 +127,12 @@ func loadThemes() {
|
|||
|
||||
if 0 == Conf.Appearance.Mode {
|
||||
if Conf.Appearance.ThemeLight == name {
|
||||
Conf.Appearance.ThemeVer = themeConf["version"].(string)
|
||||
Conf.Appearance.ThemeVer = themeConf.Version
|
||||
Conf.Appearance.ThemeJS = gulu.File.IsExist(filepath.Join(util.ThemesPath, name, "theme.js"))
|
||||
}
|
||||
} else {
|
||||
if Conf.Appearance.ThemeDark == name {
|
||||
Conf.Appearance.ThemeVer = themeConf["version"].(string)
|
||||
Conf.Appearance.ThemeVer = themeConf.Version
|
||||
Conf.Appearance.ThemeJS = gulu.File.IsExist(filepath.Join(util.ThemesPath, name, "theme.js"))
|
||||
}
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ func loadIcons() {
|
|||
}
|
||||
Conf.Appearance.Icons = append(Conf.Appearance.Icons, name)
|
||||
if Conf.Appearance.Icon == name {
|
||||
Conf.Appearance.IconVer = iconConf["version"].(string)
|
||||
Conf.Appearance.IconVer = iconConf.Version
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ func BazaarPlugins() (plugins []*bazaar.Plugin) {
|
|||
if plugin.Installed {
|
||||
if plugin.Installed {
|
||||
if pluginConf, err := bazaar.PluginJSON(plugin.Name); nil == err && nil != plugin {
|
||||
if plugin.Version != pluginConf["version"].(string) {
|
||||
if plugin.Version != pluginConf.Version {
|
||||
plugin.Outdated = true
|
||||
}
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ func BazaarWidgets() (widgets []*bazaar.Widget) {
|
|||
if widget.Installed {
|
||||
if widget.Installed {
|
||||
if widgetConf, err := bazaar.WidgetJSON(widget.Name); nil == err && nil != widget {
|
||||
if widget.Version != widgetConf["version"].(string) {
|
||||
if widget.Version != widgetConf.Version {
|
||||
widget.Outdated = true
|
||||
}
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ func BazaarIcons() (icons []*bazaar.Icon) {
|
|||
if installed == icon.Name {
|
||||
icon.Installed = true
|
||||
if themeConf, err := bazaar.IconJSON(icon.Name); nil == err {
|
||||
if icon.Version != themeConf["version"].(string) {
|
||||
if icon.Version != themeConf.Version {
|
||||
icon.Outdated = true
|
||||
}
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ func BazaarThemes() (ret []*bazaar.Theme) {
|
|||
if installed == theme.Name {
|
||||
theme.Installed = true
|
||||
if themeConf, err := bazaar.ThemeJSON(theme.Name); nil == err {
|
||||
theme.Outdated = theme.Version != themeConf["version"].(string)
|
||||
theme.Outdated = theme.Version != themeConf.Version
|
||||
}
|
||||
theme.Current = theme.Name == Conf.Appearance.ThemeDark || theme.Name == Conf.Appearance.ThemeLight
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ func BazaarTemplates() (templates []*bazaar.Template) {
|
|||
template.Installed = gulu.File.IsExist(filepath.Join(util.DataDir, "templates", template.Name))
|
||||
if template.Installed {
|
||||
if themeConf, err := bazaar.TemplateJSON(template.Name); nil == err && nil != themeConf {
|
||||
if template.Version != themeConf["version"].(string) {
|
||||
if template.Version != themeConf.Version {
|
||||
template.Outdated = true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue