A vibe coded tangled fork which supports pijul.

appview/pages: fix permalink script for tree pages

Signed-off-by: oppiliappan <me@oppi.li>

+5 -5
+1 -1
appview/pages/pages.go
··· 795 795 RepoInfo repoinfo.RepoInfo 796 796 Active string 797 797 BreadCrumbs [][]string 798 - TreePath string 798 + Path string 799 799 Raw bool 800 800 HTMLReadme template.HTML 801 801 EmailToDid map[string]string
+3 -3
appview/pages/templates/repo/tree.html
··· 59 59 {{ range .Files }} 60 60 <div class="grid grid-cols-12 gap-4 items-center py-1"> 61 61 <div class="col-span-8 md:col-span-4"> 62 - {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (pathEscape $.Ref) $.TreePath .Name }} 62 + {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (pathEscape $.Ref) $.Path .Name }} 63 63 {{ $icon := "folder" }} 64 64 {{ $iconStyle := "size-4 fill-current" }} 65 65 66 66 {{ if .IsSubmodule }} 67 - {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.TreePath .Name }} 67 + {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.Path .Name }} 68 68 {{ $icon = "folder-input" }} 69 69 {{ $iconStyle = "size-4" }} 70 70 {{ end }} 71 71 72 72 {{ if .IsFile }} 73 - {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.TreePath .Name }} 73 + {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.Path .Name }} 74 74 {{ $icon = "file" }} 75 75 {{ $iconStyle = "size-4" }} 76 76 {{ end }}
+1 -1
appview/repo/tree.go
··· 128 128 rp.pages.RepoTree(w, pages.RepoTreeParams{ 129 129 LoggedInUser: user, 130 130 BreadCrumbs: breadcrumbs, 131 - TreePath: treePath, 131 + Path: treePath, 132 132 RepoInfo: rp.repoResolver.GetRepoInfo(r, user), 133 133 EmailToDid: emailToDidMap, 134 134 LastCommitInfo: lastCommitInfo,