feat(plugins): changed so that plugins can load css async via util function exposed from app/plugins/sdk

This commit is contained in:
Torkel Ödegaard
2016-02-10 13:09:39 +01:00
parent dfe0e258cd
commit ae39ec8585
6 changed files with 14 additions and 23 deletions

View File

@ -28,7 +28,6 @@ type AppIncludeInfo struct {
type AppPlugin struct {
FrontendPluginBase
Css *AppPluginCss `json:"css"`
Pages []*AppPluginPage `json:"pages"`
Routes []*AppPluginRoute `json:"routes"`
Includes []*AppIncludeInfo `json:"-"`
@ -68,11 +67,6 @@ func (app *AppPlugin) Load(decoder *json.Decoder, pluginDir string) error {
func (app *AppPlugin) initApp() {
app.initFrontendPlugin()
if app.Css != nil {
app.Css.Dark = evalRelativePluginUrlPath(app.Css.Dark, app.Id)
app.Css.Light = evalRelativePluginUrlPath(app.Css.Light, app.Id)
}
// check if we have child panels
for _, panel := range Panels {
if strings.HasPrefix(panel.PluginDir, app.PluginDir) {