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
Authored at: 2026-02-21 19:07:21 +0200
Change ID: zkwuqmvulqmzopvrvoxsvulnomomrovw
Parent: 75a25c9
M internal/handlers/handlers.go
路路路
        60
        60
         }

      
        61
        61
         

      
        62
        62
         var templateFuncs = template.FuncMap{

      
        63
        
        -	"humanizeTime": func(t time.Time) string { return humanize.Time(t) },

      
        
        63
        +	"humanizeRelTime": func(t time.Time) string { return humanize.Time(t) },

      
        
        64
        +	"humanizeTime":    func(t time.Time) string { return t.Format("2006-01-02 15:04:05 MST") },

      
        64
        65
         	"commitSummary": func(s string) string {

      
        65
        66
         		before, after, found := strings.Cut(s, "\n")

      
        66
        67
         		first := strings.TrimSuffix(before, "\r")

      
M web/templates/index.html
路路路
        31
        31
                     <td class="nowrap">

      
        32
        32
                       {{ if not .LastCommit.IsZero }}

      
        33
        33
                       <span class="age">

      
        34
        
        -                {{- humanizeTime .LastCommit -}}

      
        35
        
        -                <span class="tooltip" role="tooltip">{{- .LastCommit -}}</span>

      
        
        34
        +                {{- humanizeRelTime .LastCommit -}}

      
        
        35
        +                <span class="tooltip" role="tooltip">{{- humanizeTime .LastCommit -}}</span>

      
        36
        36
                       </span>

      
        37
        37
                       {{ else }}

      
        38
        38
                       <span class="muted">n/a</span>

      
M web/templates/repo_commit.html
路路路
        30
        30
                   </div>

      
        31
        31
                   <div>

      
        32
        32
                     <strong>Committed at:</strong>

      
        33
        
        -            {{ $commit.Committed }}

      
        
        33
        +            {{ humanizeTime $commit.Committed }}

      
        34
        34
                   </div>

      
        35
        35
                   {{ if $commit.ChangeID -}}

      
        36
        36
                   <div>

      
M web/templates/repo_index.html
路路路
        21
        21
                       &mdash; {{ .AuthorName }}

      
        22
        22
                       <span class="commit-date commit-info age">

      
        23
        23
                         {{ .Committed.Format "Mon, 02 Jan 2006" }}

      
        24
        
        -                <span class="tooltip" role="tooltip">{{ .Committed }}</span>

      
        
        24
        +                <span class="tooltip" role="tooltip">{{ humanizeTime .Committed }}</span>

      
        25
        25
                       </span>

      
        26
        26
                     </div>

      
        27
        27
                     <div>

      路路路
        40
        40
                   <br>

      
        41
        41
                   <h2>Mirror status</h2>

      
        42
        42
                   <p>

      
        43
        
        -            Last updated {{ humanizeTime .P.MirrorLastSync }} from:

      
        
        43
        +            Last updated {{ humanizeRelTime .P.MirrorLastSync }} from:

      
        44
        44
                     <a href="{{.P.MirrorURL}}" target="_blank">{{.P.MirrorURL}}</a>

      
        45
        45
                   </p>

      
        46
        46
                   {{- end}}

      
M web/templates/repo_log.html
路路路
        39
        39
                       <a href="/{{ $repo }}/commit/{{ .Hash }}">{{ .HashShort }}</a>

      
        40
        40
                     </td>

      
        41
        41
                     <td class="age nowrap">

      
        42
        
        -              {{ humanizeTime .Committed }}

      
        43
        
        -              <span class="tooltip" role="tooltip">{{ .Committed }}</span>

      
        
        42
        +              {{ humanizeRelTime .Committed }}

      
        
        43
        +              <span class="tooltip" role="tooltip">{{ humanizeTime .Committed }}</span>

      
        44
        44
                     </td>

      
        45
        45
                   </tr>

      
        46
        46
                   {{ end }}