diff --git a/.vscode/launch.json b/.vscode/launch.json index 8982920..42e06da 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -29,5 +29,15 @@ "AMSTERDAM_CONFIG": "${workspaceFolder}/test2.yaml" } }, + { + "name": "EMinds Reborn", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}", + "env": { + "AMSTERDAM_CONFIG": "/u01/home/amy/Erbosoft/emreborn/amsterdam.yaml" + } + }, ] } diff --git a/ui/menus.go b/ui/menus.go index ffa0c35..400af5a 100644 --- a/ui/menus.go +++ b/ui/menus.go @@ -31,6 +31,7 @@ import ( type MenuItem struct { Text string `yaml:"text"` Link string `yaml:"link"` + Image string `yaml:"image"` Disabled bool `yaml:"disabled"` Hazard bool `yaml:"hazard"` Permission string `yaml:"permission"` diff --git a/ui/views/block_leftmenus.jet b/ui/views/block_leftmenus.jet index a1882ae..853e366 100644 --- a/ui/views/block_leftmenus.jet +++ b/ui/views/block_leftmenus.jet @@ -8,13 +8,25 @@ *} {{ block leftMenu(menu) }}
-
{{ menu.Title }}
+ {{ if menu.Title != "" }} +
{{ menu.Title }}
+ {{ end }} {{ range _, it := menu.Items }} {{ if it.Show(.) }} - {{ if it.Disabled }} -
{{ it.Text }}
+ {{ if it.Image != "" }} + {{ if it.Link != "" && !it.Disabled }} + {{ it.Text }} + {{ else }} + {{ it.Text }} + {{ end }} {{ else }} - {{ it.Text }} + {{ if it.Disabled }} +
{{ it.Text }}
+ {{ else if it.Link != "" }} + {{ it.Text }} + {{ else }} +
{{ it.Text }}
+ {{ end }} {{ end }} {{ end }} {{ end }} @@ -26,13 +38,25 @@
{{ __comm.Name }}
-
{{ menu.Title }}
+ {{ if menu.Title != "" }} +
{{ menu.Title }}
+ {{ end }} {{ range _, it := menu.Items }} {{ if it.Show(.) }} - {{ if it.Disabled }} -
{{ it.Text }}
+ {{ if it.Image != "" }} + {{ if it.Link != "" && !it.Disabled }} + {{ it.Text }} + {{ else }} + {{ it.Text }} + {{ end }} {{ else }} -
{{ it.Text }}
+ {{ if it.Disabled }} +
{{ it.Text }}
+ {{ else if it.Link != "" }} +
{{ it.Text }}
+ {{ else }} +
{{ it.Text }}
+ {{ end }} {{ end }} {{ end }} {{ end }} diff --git a/ui/views/menu.jet b/ui/views/menu.jet index a1a9252..3db9ac7 100644 --- a/ui/views/menu.jet +++ b/ui/views/menu.jet @@ -8,36 +8,47 @@ *}
-
- {{ if menu.Subtitle != "" }} -
-

{{ menu.Title }}

-

{{ menu.Subtitle }}

-
- {{ else }} -

{{ menu.Title }}

- {{ end }} -
-
+ {{ if menu.Title != "" }} +
+ {{ if menu.Subtitle != "" }} +
+

{{ menu.Title }}

+

{{ menu.Subtitle }}

+
+ {{ else }} +

{{ menu.Title }}

+ {{ end }} +
+
+ {{ end }} - +