From 008f5d8cf1c40b96f43b19ecf48240fc4b86e3f0 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 29 Aug 2023 21:15:19 +0900 Subject: [PATCH] Add default label in branch select list (#26697) --- options/locale/locale_en-US.ini | 1 + templates/repo/branch_dropdown.tmpl | 1 + web_src/js/components/RepoBranchTagSelector.vue | 3 +++ 3 files changed, 5 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 31d47ad6af..f8e068fe19 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -970,6 +970,7 @@ trust_model_helper_collaborator_committer = Collaborator+Committer: Trust signat trust_model_helper_default = Default: Use the default trust model for this installation create_repo = Create Repository default_branch = Default Branch +default_branch_label = default default_branch_helper = The default branch is the base branch for pull requests and code commits. mirror_prune = Prune mirror_prune_desc = Remove obsolete remote-tracking references diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index a011111d5b..79eff1c53a 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -30,6 +30,7 @@ 'textCreateBranchFrom': {{.root.locale.Tr "repo.branch.create_from"}}, 'textBranches': {{.root.locale.Tr "repo.branches"}}, 'textTags': {{.root.locale.Tr "repo.tags"}}, + 'textDefaultBranchLabel': {{.root.locale.Tr "repo.default_branch_label"}}, 'mode': '{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}', 'showBranchesInDropdown': {{$showBranchesInDropdown}}, diff --git a/web_src/js/components/RepoBranchTagSelector.vue b/web_src/js/components/RepoBranchTagSelector.vue index 07fbd634fd..1889bfb222 100644 --- a/web_src/js/components/RepoBranchTagSelector.vue +++ b/web_src/js/components/RepoBranchTagSelector.vue @@ -30,6 +30,9 @@