2023-04-23 10:21:21 +00:00
|
|
|
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings lfs")}}
|
|
|
|
<div class="user-main-content twelve wide column content repository file list">
|
2019-10-28 18:31:55 +00:00
|
|
|
<div class="tab-size-8 non-diff-file-content">
|
|
|
|
<h4 class="ui top attached header">
|
2023-09-25 08:56:50 +00:00
|
|
|
<a href="{{.LFSFilesLink}}">{{ctx.Locale.Tr "repo.settings.lfs"}}</a> / <span class="truncate sha">{{.LFSFile.Oid}}</span>
|
2019-10-28 18:31:55 +00:00
|
|
|
<div class="ui right">
|
2022-01-07 01:18:52 +00:00
|
|
|
{{if .EscapeStatus.Escaped}}
|
2024-03-24 18:23:38 +00:00
|
|
|
<a class="ui tiny basic button unescape-button tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
|
2024-01-12 14:43:40 +00:00
|
|
|
<a class="ui tiny basic button escape-button">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
|
2022-01-07 01:18:52 +00:00
|
|
|
{{end}}
|
2024-01-12 14:43:40 +00:00
|
|
|
<a class="ui primary tiny button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
2019-10-28 18:31:55 +00:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table unstackable segment">
|
2022-01-07 01:18:52 +00:00
|
|
|
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
|
2022-12-17 20:22:25 +00:00
|
|
|
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
|
2024-04-01 13:11:30 +00:00
|
|
|
{{if .IsFileTooLarge}}
|
|
|
|
{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
|
|
|
|
{{else if .IsMarkup}}
|
2024-02-25 10:45:56 +00:00
|
|
|
{{if .FileContent}}{{.FileContent | SafeHTML}}{{end}}
|
2022-12-17 20:22:25 +00:00
|
|
|
{{else if .IsPlainText}}
|
2024-02-25 10:45:56 +00:00
|
|
|
<pre>{{if .FileContent}}{{.FileContent | SafeHTML}}{{end}}</pre>
|
2019-10-28 18:31:55 +00:00
|
|
|
{{else if not .IsTextFile}}
|
2023-05-29 12:10:00 +00:00
|
|
|
<div class="view-raw">
|
2019-10-28 18:31:55 +00:00
|
|
|
{{if .IsImageFile}}
|
2021-11-16 18:18:25 +00:00
|
|
|
<img src="{{$.RawFileLink}}">
|
2019-10-28 18:31:55 +00:00
|
|
|
{{else if .IsVideoFile}}
|
2021-11-16 18:18:25 +00:00
|
|
|
<video controls src="{{$.RawFileLink}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
<strong>{{ctx.Locale.Tr "repo.video_not_supported_in_browser"}}</strong>
|
2019-10-28 18:31:55 +00:00
|
|
|
</video>
|
|
|
|
{{else if .IsAudioFile}}
|
2021-11-16 18:18:25 +00:00
|
|
|
<audio controls src="{{$.RawFileLink}}">
|
2023-09-25 08:56:50 +00:00
|
|
|
<strong>{{ctx.Locale.Tr "repo.audio_not_supported_in_browser"}}</strong>
|
2019-10-28 18:31:55 +00:00
|
|
|
</audio>
|
|
|
|
{{else if .IsPDFFile}}
|
2023-09-25 08:56:50 +00:00
|
|
|
<div class="pdf-content is-loading" data-src="{{$.RawFileLink}}" data-fallback-button-text="{{ctx.Locale.Tr "diff.view_file"}}"></div>
|
2019-10-28 18:31:55 +00:00
|
|
|
{{else}}
|
2024-04-01 13:11:30 +00:00
|
|
|
<a href="{{$.RawFileLink}}" rel="nofollow" class="tw-p-4">{{ctx.Locale.Tr "repo.file_view_raw"}}</a>
|
2019-10-28 18:31:55 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{else if .FileSize}}
|
|
|
|
<table>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="lines-num">{{.LineNums}}</td>
|
2023-04-04 11:05:07 +00:00
|
|
|
<td class="lines-code"><pre><code class="{{.HighlightClass}}"><ol>{{.FileContent}}</ol></code></pre></td>
|
2019-10-28 18:31:55 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-23 10:21:21 +00:00
|
|
|
{{template "repo/settings/layout_footer" .}}
|