mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 06:05:30 +02:00
refactor to remove ENABLE_SIZE_LIMIT option and replace it with -1 in the config.
This commit is contained in:
14 files changed
+123
-88
No files matched your search
@@ -6,18 +6,6 @@
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "admin.config.enable_size_limit"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="enable_size_limit" type="checkbox" {{if .EnableSizeLimit}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="lfs_size_in_repo_size" type="checkbox" {{if .LFSSizeInRepoSize}}checked{{end}} data-tooltip-content='{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size.desc"}}'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Repo_Size_Limit}}error{{end}}">
|
||||
<label for="repo_size_limit">{{ctx.Locale.Tr "admin.config.repo_size_limit"}}</label>
|
||||
<input id="repo_size_limit" name="repo_size_limit" value="{{.RepoSizeLimit}}" data-tooltip-content='{{ctx.Locale.Tr "admin.config.repo_size_limit.desc"}}'>
|
||||
@@ -26,6 +14,12 @@
|
||||
<label for="lfs_size_limit">{{ctx.Locale.Tr "admin.config.lfs_size_limit"}}</label>
|
||||
<input id="lfs_size_limit" name="lfs_size_limit" value="{{.LFSSizeLimit}}" data-tooltip-content='{{ctx.Locale.Tr "admin.config.lfs_size_limit.desc"}}'>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="lfs_size_in_repo_size" type="checkbox" {{if .LFSSizeInRepoSize}}checked{{end}} data-tooltip-content='{{ctx.Locale.Tr "admin.config.lfs_size_in_repo_size.desc"}}'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{ctx.Locale.Tr "admin.config.update_settings"}}</button>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.repo_size"}}</label>
|
||||
<span {{if .Err_RepoSize}}class="ui text red"{{end}} {{if not (eq .Repository.Size 0)}} data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>{{FileSize .Repository.Size}}
|
||||
{{if and .ActualSizeLimit .EnableSizeLimit}}
|
||||
{{if and .ActualSizeLimit (or (gt .RepoSizeLimit -1) (gt .LFSSizeLimit -1))}}
|
||||
/ {{FileSize .ActualSizeLimit}}
|
||||
{{end}}
|
||||
</span>
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.lfs_size"}}</label>
|
||||
<span>{{FileSize .Repository.LFSSize}}
|
||||
{{if and .ActualLFSSizeLimit .EnableSizeLimit}}
|
||||
{{if and .ActualLFSSizeLimit (or (gt .RepoSizeLimit -1) (gt .LFSSizeLimit -1))}}
|
||||
/ {{FileSize .ActualLFSSizeLimit}}
|
||||
{{end}}
|
||||
</span>
|
||||
@@ -31,14 +31,15 @@
|
||||
<div class="field {{if .Err_RepoSizeLimit}}error{{end}}" {{if not .IsAdmin}}style="display:none;"{{end}}>
|
||||
<label for="repo_size_limit">{{ctx.Locale.Tr "repo.repo_size_limit"}}</label>
|
||||
<input id="repo_size_limit" name="repo_size_limit"
|
||||
{{if not .EnableSizeLimit}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .Repository.SizeLimit}}{{FileSize .Repository.SizeLimit}}{{end}}">
|
||||
{{if and (eq .RepoSizeLimit -1) (eq .LFSSizeLimit -1)}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .RepoSizeLimitText}}{{.RepoSizeLimitText}}{{else if .Repository.SizeLimit}}{{FileSize .Repository.SizeLimit}}{{end}}"
|
||||
data-tooltip-content='{{ctx.Locale.Tr "repo.repo_size_limit_helper"}}'>
|
||||
</div>
|
||||
<div class="field {{if .Err_LFSSizeLimit}}error{{end}}" {{if not .IsAdmin}}style="display:none;"{{end}}>
|
||||
<label for="lfs_size_limit">{{ctx.Locale.Tr "repo.lfs_size_limit"}}</label>
|
||||
<input id="lfs_size_limit" name="lfs_size_limit"
|
||||
{{if not .EnableSizeLimit}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .Repository.LFSSizeLimit}}{{FileSize .Repository.LFSSizeLimit}}{{end}}"
|
||||
{{if and (eq .RepoSizeLimit -1) (eq .LFSSizeLimit -1)}}class="ui text light grey"{{end}}
|
||||
type="text" value="{{if .LFSSizeLimitText}}{{.LFSSizeLimitText}}{{else if .Repository.LFSSizeLimit}}{{FileSize .Repository.LFSSizeLimit}}{{end}}"
|
||||
data-tooltip-content='{{ctx.Locale.Tr "repo.lfs_size_limit_helper"}}'>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
|
||||
Reference in new issue
Block a user