Theming: Support for runtime theme switching and hooks for custom themes (#31301)

* WIP Custom themes

* Load custom themes from URL and via event

* Dynamic page background

* Header color change

* Fixing tests and emotion warnings

* Fixed test

* moving cx to getStyles

* Review fixes

* minor change
This commit is contained in:
Torkel Ödegaard
2021-02-20 09:02:06 +01:00
committed by GitHub
parent 58968e1ceb
commit 3e55c967ee
16 changed files with 197 additions and 210 deletions

View File

@@ -62,3 +62,6 @@ type NavLink struct {
HideFromTabs bool `json:"hideFromTabs,omitempty"`
Children []*NavLink `json:"children,omitempty"`
}
// NavIDCfg is the id for org configuration navigation node
const NavIDCfg = "cfg"

View File

@@ -282,7 +282,7 @@ func (hs *HTTPServer) getNavTree(c *models.ReqContext, hasEditPerm bool) ([]*dto
if len(configNodes) > 0 {
navTree = append(navTree, &dtos.NavLink{
Id: "cfg",
Id: dtos.NavIDCfg,
Text: "Configuration",
SubTitle: "Organization: " + c.OrgName,
Icon: "cog",