]> source.dussan.org Git - gitea.git/commitdiff
Display latest sync time for pull mirrors on the repo page (#28712)
authorDmitry Sharshakov <d3dx12.xx@gmail.com>
Mon, 15 Jan 2024 14:37:14 +0000 (17:37 +0300)
committerGitHub <noreply@github.com>
Mon, 15 Jan 2024 14:37:14 +0000 (14:37 +0000)
Fixes #25168

---------

Co-authored-by: delvh <dev.lh@web.de>
templates/repo/header.tmpl

index 9630cd3a6f76914dc5064bd5e02c16cab485b52a..c362059ef3be2088a1d8a0449b90d1e13ba29154 100644 (file)
                                                <div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
                                        {{end}}
                                </div>
+                               {{if $.PullMirror}}
+                                       <div class="fork-flag">
+                                               {{ctx.Locale.Tr "repo.mirror_from"}}
+                                               <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
+                                               {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}}
+                                       </div>
+                               {{end}}
                        </div>
                        {{if not (or .IsBeingCreated .IsBroken)}}
                                <div class="repo-buttons">