diff options
author | CaiCandong <50507092+CaiCandong@users.noreply.github.com> | 2023-08-05 19:04:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 13:04:14 +0200 |
commit | 9ac6bb053cb2462770dc279b8a59ce944e8da8f6 (patch) | |
tree | 1e4f2f5a73c480d4e7ac976c35294d544eb8d3c5 | |
parent | 952882fe4ab6950ca0fb33af3885cb3347d46e78 (diff) | |
download | gitea-9ac6bb053cb2462770dc279b8a59ce944e8da8f6.tar.gz gitea-9ac6bb053cb2462770dc279b8a59ce944e8da8f6.zip |
Hide `last indexed SHA` when a repo could not be indexed yet (#26340)
Now, for a new repo without any commit, the Last indexed SHA field looks like this:
Before:

After:

Fixes #26336
-rw-r--r-- | templates/repo/settings/options.tmpl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 569a576ce6..b247e85fa3 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -680,9 +680,11 @@ {{end}} <h4 class="ui header">{{.locale.Tr "repo.settings.admin_stats_indexer"}}</h4> <div class="inline fields"> - <label>{{.locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label> + {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} + <label>{{.locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label> + {{end}} <span class="field"> - {{if .StatsIndexerStatus}} + {{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}} <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}"> <span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span> </a> |