From 5003caf6d5e09c1421e91495a722437fdf6e39d2 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sat, 13 Jan 2024 15:48:24 +0000 Subject: [PATCH 1/2] Display latest sync time for pull mirrors on the repo page --- templates/repo/header.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index af00b2b3831ea..8455d7e98e8a9 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -27,7 +27,11 @@ {{if $.PullMirror}} -
{{ctx.Locale.Tr "repo.mirror_from"}} {{$.PullMirror.RemoteAddress}}
+
+ {{ctx.Locale.Tr "repo.mirror_from"}} + {{$.PullMirror.RemoteAddress}} + {{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}} +
{{end}} {{if .IsFork}}
{{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
{{end}} {{if .IsGenerated}}
{{ctx.Locale.Tr "repo.generated_from"}} {{(.TemplateRepo ctx).FullName}}
{{end}} From 45b0f8be1c79933708d9f66093e75eecd138d5f8 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Mon, 15 Jan 2024 16:23:25 +0300 Subject: [PATCH 2/2] Update templates/repo/header.tmpl Co-authored-by: delvh --- templates/repo/header.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 8455d7e98e8a9..cc19210342acf 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -30,7 +30,7 @@
{{ctx.Locale.Tr "repo.mirror_from"}} {{$.PullMirror.RemoteAddress}} - {{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}} + {{if $.PullMirror.UpdatedUnix}}{{ctx.Locale.Tr "repo.mirror_sync"}} {{TimeSinceUnix $.PullMirror.UpdatedUnix ctx.Locale}}{{end}}
{{end}} {{if .IsFork}}
{{ctx.Locale.Tr "repo.forked_from"}} {{.BaseRepo.FullName}}
{{end}}