feat(apps): more work on apps and how apps can include panels

This commit is contained in:
Torkel Ödegaard
2016-01-19 18:18:53 +01:00
parent 6b85a6fd78
commit 7a26d309b1
11 changed files with 96 additions and 72 deletions

View File

@ -8,21 +8,22 @@ import (
type FrontendPluginBase struct {
PluginBase
Module string `json:"module"`
StaticRoot string `json:"staticRoot"`
Module string `json:"module"`
StaticRoot string `json:"staticRoot"`
StaticRootAbs string `json:"-"`
}
func (fp *FrontendPluginBase) initFrontendPlugin() {
if fp.StaticRoot != "" {
fp.StaticRootAbs = filepath.Join(fp.PluginDir, fp.StaticRoot)
StaticRoutes = append(StaticRoutes, &PluginStaticRoute{
Directory: filepath.Join(fp.PluginDir, fp.StaticRoot),
Directory: fp.StaticRootAbs,
PluginId: fp.Id,
})
}
fp.Info.Logos.Small = evalRelativePluginUrlPath(fp.Info.Logos.Small, fp.Id)
fp.Info.Logos.Large = evalRelativePluginUrlPath(fp.Info.Logos.Large, fp.Id)
fp.handleModuleDefaults()
}