Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/commit: future-dated commits display as "now" in commit list view

Fixes [#672](https://tangled.org/tangled.org/core/issues/672)

author
smitp.cc
committer
Tangled
date (Jul 21, 2026, 6:56 PM +0300) commit c13c1447 parent c11f472c
+4 -1
+3
appview/pages/funcmap.go
··· 285 285 {D: math.MaxInt64, Format: "a long while %s", DivBy: 1}, 286 286 }) 287 287 }, 288 + "isFutureTime": func(t time.Time) bool { 289 + return t.After(time.Now()) 290 + }, 288 291 "shortTimeFmt": func(t time.Time) string { 289 292 return t.Format("Jan 2, 2006") 290 293 },
+1 -1
appview/pages/templates/repo/fragments/shortTimeAgo.html
··· 1 1 {{ define "repo/fragments/shortTimeAgo" }} 2 2 {{ $formatted := shortRelTimeFmt . }} 3 3 {{ $content := printf "%s ago" $formatted }} 4 - {{ if eq $formatted "now" }} 4 + {{ if or (eq $formatted "now") (isFutureTime .) }} 5 5 {{ $content = "now" }} 6 6 {{ end }} 7 7 {{ template "repo/fragments/timeWrapper" (dict "Time" . "Content" $content) }}