TopNav: Make it possible to to have sections without children (#57815)

This commit is contained in:
Torkel Ödegaard
2022-10-31 11:01:34 +01:00
committed by GitHub
parent 656f159ae9
commit 19b961465c
4 changed files with 7 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ type NavLink struct {
HideFromTabs bool `json:"hideFromTabs,omitempty"`
ShowIconInNavbar bool `json:"showIconInNavbar,omitempty"`
RoundIcon bool `json:"roundIcon,omitempty"`
IsSection bool `json:"isSection,omitempty"`
Children []*NavLink `json:"children,omitempty"`
HighlightText string `json:"highlightText,omitempty"`
HighlightID string `json:"highlightId,omitempty"`

View File

@@ -71,6 +71,7 @@ func (s *ServiceImpl) processAppPlugin(plugin plugins.PluginDTO, c *models.ReqCo
Img: plugin.Info.Logos.Small,
Section: navtree.NavSectionPlugin,
SortWeight: navtree.WeightPlugin,
IsSection: true,
}
if topNavEnabled {