Commit ffe14072 by Torkel Ödegaard

feat(apps): minor progress

parent 2fe58461
......@@ -85,7 +85,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
if plugin.Pinned {
data.MainNavLinks = append(data.MainNavLinks, &dtos.NavLink{
Text: plugin.Name,
Url: setting.AppSubUrl + "/apps/edit/" + plugin.Id,
Url: "/apps/edit/" + plugin.Id,
Img: plugin.Info.Logos.Small,
})
}
......
......@@ -26,13 +26,18 @@ type AppPlugin struct {
Enabled bool `json:"-"`
}
func (p *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {
if err := decoder.Decode(&p); err != nil {
func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {
if err := decoder.Decode(&app); err != nil {
return err
}
p.PluginDir = pluginDir
p.initFrontendPlugin()
Apps[p.Id] = p
if app.Css != nil {
app.Css.Dark = evalRelativePluginUrlPath(app.Css.Dark, app.Id)
app.Css.Light = evalRelativePluginUrlPath(app.Css.Light, app.Id)
}
app.PluginDir = pluginDir
app.initFrontendPlugin()
Apps[app.Id] = app
return nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment