1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[Fix] Don't display way too large files #1513 (#3253)

* Add MaxDisplayFileSize setting

* Don't show files that are too large

* Localized FileTooLarge

* Change IsFileTooBig => IsFileTooLarge
This commit is contained in:
Kim Carlbäcker
2016-07-12 00:21:26 +02:00
committed by 无闻
parent de10387f41
commit f4ab50501e
6 changed files with 730 additions and 934 deletions

View File

@@ -41,8 +41,12 @@
<table>
<tbody>
<tr>
{{if .IsFileTooLarge}}
<td><strong>{{.i18n.Tr "repo.file_too_large"}}</strong></td>
{{else}}
<td class="lines-num"></td>
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol class="linenums">{{.FileContent}}</ol></code></pre></td>
{{end}}
</tr>
</tbody>
</table>