Skip to content

Commit 2d343f8

Browse files
dssengdelvh
andauthored
Display latest sync time for pull mirrors on the repo page (#28712)
Fixes #25168 --------- Co-authored-by: delvh <[email protected]>
1 parent 3793ec4 commit 2d343f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/repo/header.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
2929
{{end}}
3030
</div>
31+
{{if $.PullMirror}}
32+
<div class="fork-flag">
33+
{{ctx.Locale.Tr "repo.mirror_from"}}
34+
<a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a>
35+
{{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}}
36+
</div>
37+
{{end}}
3138
</div>
3239
{{if not (or .IsBeingCreated .IsBroken)}}
3340
<div class="repo-buttons">

0 commit comments

Comments
 (0)