From dc08de24191a68a3c08defdb97b5b416df380c95 Mon Sep 17 00:00:00 2001 From: Maxime Date: Fri, 19 Apr 2024 15:54:38 +0200 Subject: [PATCH] add module silvermobi to lateral navbar --- renderer/renderer.go | 8 ++++++++ renderer/silvermobi.go | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 renderer/silvermobi.go diff --git a/renderer/renderer.go b/renderer/renderer.go index aae7262..1de92fd 100755 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -251,6 +251,14 @@ func NewState(r *http.Request, themeConfig *viper.Viper, menuState string) Rende Icon: "hero:outline/user-group", }) } + if modules["silvermobi"] != nil && modules["silvermobi"].(bool) { + ls.MenuItems = append(ls.MenuItems, MenuItem{ + Title: "Silvermobi", + Link: "/app/silvermobi/", + Active: menuState == silvermobiMenu, + Icon: "hero:outline/map", + }) + } return RenderState{ IconSet: icons.NewIconSet(iconset), Group: group, diff --git a/renderer/silvermobi.go b/renderer/silvermobi.go new file mode 100644 index 0000000..7b6a2da --- /dev/null +++ b/renderer/silvermobi.go @@ -0,0 +1,3 @@ +package renderer + +const silvermobiMenu = "silvermobi" \ No newline at end of file