Filter for default-branch selection (#29388)

Filter for default-branch selection (fixes #4751)

before:

![image](https://github.com/go-gitea/gitea/assets/72873130/dcae266d-2e04-41bf-8739-64a85c9007f6)

after:

![image](https://github.com/go-gitea/gitea/assets/72873130/5f27c0a7-1d30-4ccd-b4bb-6c34fff1b79f)

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Tim-Niclas Oelschläger 2024-03-08 06:36:27 +01:00 committed by GitHub
parent 7cf7a499be
commit c8f4897f7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="action" value="default_branch"> <input type="hidden" name="action" value="default_branch">
{{if not .Repository.IsEmpty}} {{if not .Repository.IsEmpty}}
<div class="ui dropdown selection gt-f1 gt-mr-3 tw-max-w-96"> <div class="ui dropdown selection search gt-f1 gt-mr-3 tw-max-w-96">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}"> <input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}">
<div class="default text">{{.Repository.DefaultBranch}}</div> <div class="default text">{{.Repository.DefaultBranch}}</div>