Canvas V2

This commit is contained in:
2026-10-04 15:58:27 +02:00
parent 95002a34ad
commit 06da56d0a0
7 changed files with 1008 additions and 333 deletions
+2 -1
View File
@@ -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 != "" {