Canvas V2
This commit is contained in:
@@ -227,6 +227,7 @@ type canvasCardBody struct {
|
||||
Icon template.HTML
|
||||
Name, URL string
|
||||
Host string
|
||||
Label string // a link's display text, shown instead of its URL
|
||||
}
|
||||
|
||||
type canvasGroupBody struct {
|
||||
@@ -255,7 +256,7 @@ func (h *handler) renderCanvasNode(n canvasNode) canvasNodeView {
|
||||
if u, err := url.Parse(n.URL); err == nil && u.Host != "" {
|
||||
host = u.Host
|
||||
}
|
||||
v.Body = execNodeTemplate("canvas-link", canvasCardBody{Name: n.URL, URL: n.URL, Host: host})
|
||||
v.Body = execNodeTemplate("canvas-link", canvasCardBody{Name: n.URL, URL: n.URL, Host: host, Label: strings.TrimSpace(n.Label)})
|
||||
case "group":
|
||||
v.Label = n.Label
|
||||
if n.Background != "" {
|
||||
|
||||
Reference in New Issue
Block a user