max width for filetree

This commit is contained in:
Bel LaPointe
2022-02-16 07:53:27 -07:00
parent 95c560cd23
commit 9923b182f4
3 changed files with 16 additions and 4 deletions

View File

@@ -222,7 +222,19 @@ func (server *Server) uiSearchHandler(w http.ResponseWriter, r *http.Request) er
data[i].ID = idsTitles[i][0]
data[i].Title = idsTitles[i][1]
}
return t.Lookup("search").Execute(w, map[string]interface{}{"Results": data})
tree := server.tree()
branches, err := tree.GetRootMeta()
if err != nil {
return err
}
branchesJSON, err := json.Marshal(branches)
if err != nil {
return err
}
return t.Lookup("search").Execute(w, map[string]interface{}{
"Results": data,
"Tree": string(branchesJSON),
})
}
func (server *Server) uiFilesHandler(w http.ResponseWriter, r *http.Request) error {