aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorxpy <865934097@qq.com>2022-08-15 11:12:01 +0800
committerGitHub <noreply@github.com>2022-08-14 23:12:01 -0400
commitefaa9958b5a5b90381da439ba78a0abad945703e (patch)
treeeca3df651cf4f6b67538d5ee4781ffe807e62c70 /templates
parent58a4407acb04b329e94e92977b1414feb309d5de (diff)
downloadgitea-efaa9958b5a5b90381da439ba78a0abad945703e.tar.gz
gitea-efaa9958b5a5b90381da439ba78a0abad945703e.zip
Fix push mirror address backend get error Address cause setting page display error (#20593)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/header.tmpl2
-rw-r--r--templates/repo/settings/options.tmpl6
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 87a4a2fdaf..e6ed76bb60 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -38,7 +38,7 @@
</div>
</div>
{{if $.IsPullMirror}}
- {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName}}
+ {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName false}}
<div class="fork-flag">{{$.locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>
{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}}
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 98cf4f88c8..f34057d9c0 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -91,7 +91,7 @@
{{if .Repository.IsMirror}}
<tbody>
<tr>
- <td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName).Address}}</td>
+ <td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}</td>
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
<td>{{.Mirror.UpdatedUnix.AsTime}}</td>
<td class="right aligned">
@@ -119,7 +119,7 @@
<label for="interval">{{.locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
<input id="interval" name="interval" value="{{.MirrorInterval}}">
</div>
- {{$address := MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName}}
+ {{$address := MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false}}
<div class="field {{if .Err_MirrorAddress}}error{{end}}">
<label for="mirror_address">{{.locale.Tr "repo.mirror_address"}}</label>
<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
@@ -168,7 +168,7 @@
<tbody>
{{range .PushMirrors}}
<tr>
- {{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName}}
+ {{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}}
<td>{{$address.Address}}</td>
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
<td>{{if .LastUpdateUnix}}{{.LastUpdateUnix.AsTime}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label tooltip" data-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td>