Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Remove repository tab polling and rename Code to Source

cc7faea36a31373079df8fce68c1bc20a44873a0 · Keenan Nemetz · 3d ago · parent 0a12642f

Remove repository tab polling and rename Code to Source

The tab row no longer polls its open counts, so the /{name}/counts endpoint, its htmx trigger, and the badge animation are gone. The unfocused-window note has been removed while the other live regions still pause.

The Code tab is now Source, served at /{name}/source; links, sitemap entries, markdown tree links, and tests follow the new route.

server/web/templates/code.html +4−4

@@ -1,6 +1,6 @@
1 1 {{define "code"}}
2 2 {{template "header" .}}
3 {{template "repohead" (nav .Page "code")}}
3 {{template "repohead" (nav .Page "source")}}
4 4
5 5 <div class="page-head">
6 6 <div class="page-head-main">
@@ -18,7 +18,7 @@
18 18 right. */}}
19 19 <div class="filters">
20 20 {{if .Branches}}
21 <form method="get" action="/{{.Name}}/code" class="inline">
21 <form method="get" action="/{{.Name}}/source" class="inline">
22 22 <label class="filter-field">
23 23 <span class="filter-label">Branch</span>
24 24 <select name="ref" data-autosubmit>
@@ -29,7 +29,7 @@
29 29 </form>
30 30 {{end}}
31 31 {{if .Tags}}
32 <form method="get" action="/{{.Name}}/code" class="inline">
32 <form method="get" action="/{{.Name}}/source" class="inline">
33 33 <label class="filter-field">
34 34 <span class="filter-label">Tag</span>
35 35 <select name="ref" data-autosubmit>
@@ -93,7 +93,7 @@
93 93 <div class="code-tabbar">
94 94 <span class="code-tab-icon">{{if or (eq .Mode "tree") (and (eq .Mode "overview") (not .Readme))}}{{icon "folder"}}{{else if eq .Mode "blob"}}{{icon "file"}}{{else}}{{icon "book-open"}}{{end}}</span>
95 95 <nav class="code-crumbs" aria-label="Breadcrumb">
96 <a href="/{{.Name}}/code?ref={{esc .Ref}}" hx-get="/{{.Name}}/code?ref={{esc .Ref}}" hx-target="#code-main" hx-swap="outerHTML" hx-push-url="true">{{.Ref}}</a>
96 <a href="/{{.Name}}/source?ref={{esc .Ref}}" hx-get="/{{.Name}}/source?ref={{esc .Ref}}" hx-target="#code-main" hx-swap="outerHTML" hx-push-url="true">{{.Ref}}</a>
97 97 {{range $i, $c := .Crumbs}}<span class="sep">/</span>{{if eq (inc $i) (len $.Crumbs)}}<span class="current" title="{{$c.Path}}">{{$c.Name}}</span>{{else}}<a href="/{{$.Name}}/tree/{{esc $.Ref}}/{{pathurl $c.Path}}" hx-get="/{{$.Name}}/tree/{{esc $.Ref}}/{{pathurl $c.Path}}" hx-target="#code-main" hx-swap="outerHTML" hx-push-url="true">{{$c.Name}}</a>{{end}}{{end}}
98 98 {{if not .Crumbs}}<span class="sep">/</span><span class="current">Files</span>{{end}}
99 99 </nav>