forked from gitea/gitea
1
0
Fork 0

Wrap too long push mirror addresses (#21120) (#24334)

Backport #21120 by @JakobDev

I noticed that it is possible to break the push mirror list by entering
a too long URL. This should fix it.

| Before         | After     | 
|--------------|-----------|

|![Before](https://user-images.githubusercontent.com/15185051/189294585-333965d1-0f0f-48e2-96d5-e04b84b55ae3.png)|![After](https://user-images.githubusercontent.com/15185051/189294619-301e271c-b89b-4bc0-9c11-9536bd0302be.png)|

Co-authored-by: JakobDev <jakobdev@gmx.de>
This commit is contained in:
Giteabot 2023-04-25 12:47:26 -04:00 committed by GitHub
parent ef3e3afc05
commit 1254a8271e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@
{{range .PushMirrors}}
<tr>
{{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}}
<td>{{$address.Address}}</td>
<td class="gt-word-break">{{$address.Address}}</td>
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td>
<td>{{if .LastUpdateUnix}}<time data-format="date-time" datetime="{{.LastUpdateUnix.FormatLong}}">{{.LastUpdateUnix.AsTime}}</time>{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label tooltip" data-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td>
<td class="right aligned">