mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 06:25:31 +00:00
8099238618
I think it's better if the primary actions have primary color instead of green which fits better into the overall single-color UI design. This PR currently replaces every green button with primary: <img width="141" alt="Screenshot 2023-09-16 at 14 07 59" src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe"> <img width="161" alt="Screenshot 2023-09-16 at 14 07 51" src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1"> Modal actions now use uncolored/primary instead of previous green/red colors. I also removed the box-shadow on all basic buttons: <img width="259" alt="Screenshot 2023-09-16 at 14 16 39" src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490"> <img width="261" alt="Screenshot 2023-09-16 at 14 17 42" src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88"> The change currently includes the "Merge PR" button, for which we might want to make an exception to match the icon color there: <img width="442" alt="Screenshot 2023-09-16 at 14 33 53" src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b">
74 lines
4.7 KiB
Handlebars
74 lines
4.7 KiB
Handlebars
<h4 class="ui top attached header">{{if .IsEditRule}}{{.locale.Tr "packages.owner.settings.cleanuprules.edit"}}{{else}}{{.locale.Tr "packages.owner.settings.cleanuprules.add"}}{{end}}</h4>
|
|
<div class="ui attached segment">
|
|
<form class="ui form" action="{{.Link}}" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
<input name="id" type="hidden" value="{{.CleanupRule.ID}}">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<label>{{.locale.Tr "enabled"}}</label>
|
|
<input type="checkbox" name="enabled" {{if .CleanupRule.Enabled}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
<div class="{{if .IsEditRule}}disabled {{end}}field {{if .Err_Type}}error{{end}}">
|
|
<label>{{.locale.Tr "packages.filter.type"}}</label>
|
|
<select class="ui selection dropdown" name="type">
|
|
{{range $type := .AvailableTypes}}
|
|
<option{{if eq $.CleanupRule.Type $type}} selected="selected"{{end}} value="{{$type}}">{{$type.Name}}</option>
|
|
{{end}}
|
|
</select>
|
|
</div>
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<label>{{.locale.Tr "packages.owner.settings.cleanuprules.pattern_full_match"}}</label>
|
|
<input type="checkbox" name="match_full_name" {{if .CleanupRule.MatchFullName}}checked{{end}}>
|
|
</div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<p>{{.locale.Tr "packages.owner.settings.cleanuprules.keep.title"}}</p>
|
|
<div class="field {{if .Err_KeepCount}}error{{end}}">
|
|
<label>{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}:</label>
|
|
<select class="ui selection dropdown" name="keep_count">
|
|
<option{{if eq .CleanupRule.KeepCount 0}} selected="selected"{{end}} value="0"></option>
|
|
<option{{if eq .CleanupRule.KeepCount 1}} selected="selected"{{end}} value="1">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}</option>
|
|
<option{{if eq .CleanupRule.KeepCount 5}} selected="selected"{{end}} value="5">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 5}}</option>
|
|
<option{{if eq .CleanupRule.KeepCount 10}} selected="selected"{{end}} value="10">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 10}}</option>
|
|
<option{{if eq .CleanupRule.KeepCount 25}} selected="selected"{{end}} value="25">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 25}}</option>
|
|
<option{{if eq .CleanupRule.KeepCount 50}} selected="selected"{{end}} value="50">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 50}}</option>
|
|
<option{{if eq .CleanupRule.KeepCount 100}} selected="selected"{{end}} value="100">{{.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" 100}}</option>
|
|
</select>
|
|
</div>
|
|
<div class="field {{if .Err_KeepPattern}}error{{end}}">
|
|
<label>{{.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}:</label>
|
|
<input name="keep_pattern" type="text" value="{{.CleanupRule.KeepPattern}}">
|
|
<p>{{.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern.container" | Safe}}</p>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<p>{{.locale.Tr "packages.owner.settings.cleanuprules.remove.title"}}</p>
|
|
<div class="field {{if .Err_RemoveDays}}error{{end}}">
|
|
<label>{{.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}:</label>
|
|
<select class="ui selection dropdown" name="remove_days">
|
|
<option{{if eq .CleanupRule.RemoveDays 0}} selected="selected"{{end}} value="0"></option>
|
|
<option{{if eq .CleanupRule.RemoveDays 7}} selected="selected"{{end}} value="7">{{.locale.Tr "tool.days" 7}}</option>
|
|
<option{{if eq .CleanupRule.RemoveDays 14}} selected="selected"{{end}} value="14">{{.locale.Tr "tool.days" 14}}</option>
|
|
<option{{if eq .CleanupRule.RemoveDays 30}} selected="selected"{{end}} value="30">{{.locale.Tr "tool.days" 30}}</option>
|
|
<option{{if eq .CleanupRule.RemoveDays 60}} selected="selected"{{end}} value="60">{{.locale.Tr "tool.days" 60}}</option>
|
|
<option{{if eq .CleanupRule.RemoveDays 90}} selected="selected"{{end}} value="90">{{.locale.Tr "tool.days" 90}}</option>
|
|
<option{{if eq .CleanupRule.RemoveDays 180}} selected="selected"{{end}} value="180">{{.locale.Tr "tool.days" 180}}</option>
|
|
</select>
|
|
</div>
|
|
<div class="field {{if .Err_RemovePattern}}error{{end}}">
|
|
<label>{{.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}:</label>
|
|
<input name="remove_pattern" type="text" value="{{.CleanupRule.RemovePattern}}">
|
|
</div>
|
|
<div class="field">
|
|
{{if .IsEditRule}}
|
|
<button class="ui primary button" name="action" value="save">{{.locale.Tr "save"}}</button>
|
|
<button class="ui red button" name="action" value="remove">{{.locale.Tr "remove"}}</button>
|
|
<a class="ui button" href="{{.Link}}/preview">{{.locale.Tr "packages.owner.settings.cleanuprules.preview"}}</a>
|
|
{{else}}
|
|
<button class="ui primary button" name="action" value="save">{{.locale.Tr "add"}}</button>
|
|
{{end}}
|
|
</div>
|
|
</form>
|
|
</div>
|