all repos

mugit @ cc59ce4becd876f686c626f299c8969541c1d90f

🐮 git server that your cow will love
5 files changed, 9 insertions(+), 8 deletions(-)
ui: format time
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-02-22 13:37:54 +0200
Change ID: zkwuqmvulqmzopvrvoxsvulnomomrovw
Parent: 75a25c9
M internal/handlers/handlers.go

@@ -60,7 +60,8 @@ http.ServeFileFS(w, r, web.StaticFS, f)

} var templateFuncs = template.FuncMap{ - "humanizeTime": func(t time.Time) string { return humanize.Time(t) }, + "humanizeRelTime": func(t time.Time) string { return humanize.Time(t) }, + "humanizeTime": func(t time.Time) string { return t.Format("2006-01-02 15:04:05 MST") }, "commitSummary": func(s string) string { before, after, found := strings.Cut(s, "\n") first := strings.TrimSuffix(before, "\r")
M web/templates/index.html

@@ -31,8 +31,8 @@ </a>

<td class="nowrap"> {{ if not .LastCommit.IsZero }} <span class="age"> - {{- humanizeTime .LastCommit -}} - <span class="tooltip" role="tooltip">{{- .LastCommit -}}</span> + {{- humanizeRelTime .LastCommit -}} + <span class="tooltip" role="tooltip">{{- humanizeTime .LastCommit -}}</span> </span> {{ else }} <span class="muted">n/a</span>
M web/templates/repo_commit.html

@@ -30,7 +30,7 @@ <a href="mailto:{{ $commit.AuthorEmail }}" class="commit-email">{{ $commit.AuthorEmail }}</a>

</div> <div> <strong>Committed at:</strong> - {{ $commit.Committed }} + {{ humanizeTime $commit.Committed }} </div> {{ if $commit.ChangeID -}} <div>
M web/templates/repo_index.html

@@ -21,7 +21,7 @@ <a href="/{{ $repo }}/commit/{{ .Hash }}" class="commit-hash link">{{ .HashShort }}</a>

&mdash; {{ .AuthorName }} <span class="commit-date commit-info age"> {{ .Committed.Format "Mon, 02 Jan 2006" }} - <span class="tooltip" role="tooltip">{{ .Committed }}</span> + <span class="tooltip" role="tooltip">{{ humanizeTime .Committed }}</span> </span> </div> <div>

@@ -40,7 +40,7 @@ {{- if .P.IsMirror -}}

<br> <h2>Mirror status</h2> <p> - Last updated {{ humanizeTime .P.MirrorLastSync }} from: + Last updated {{ humanizeRelTime .P.MirrorLastSync }} from: <a href="{{.P.MirrorURL}}" target="_blank">{{.P.MirrorURL}}</a> </p> {{- end}}
M web/templates/repo_log.html

@@ -39,8 +39,8 @@ <td class="commit-hash">

<a href="/{{ $repo }}/commit/{{ .Hash }}">{{ .HashShort }}</a> </td> <td class="age nowrap"> - {{ humanizeTime .Committed }} - <span class="tooltip" role="tooltip">{{ .Committed }}</span> + {{ humanizeRelTime .Committed }} + <span class="tooltip" role="tooltip">{{ humanizeTime .Committed }}</span> </td> </tr> {{ end }}