0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-29 08:17:47 +01:00

Add default label in branch select list (#26697)

This commit is contained in:
yp05327 2023-08-29 21:15:19 +09:00 committed by GitHub
parent ad3cbbc3b1
commit 008f5d8cf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -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 trust_model_helper_default = Default: Use the default trust model for this installation
create_repo = Create Repository create_repo = Create Repository
default_branch = Default Branch default_branch = Default Branch
default_branch_label = default
default_branch_helper = The default branch is the base branch for pull requests and code commits. default_branch_helper = The default branch is the base branch for pull requests and code commits.
mirror_prune = Prune mirror_prune = Prune
mirror_prune_desc = Remove obsolete remote-tracking references mirror_prune_desc = Remove obsolete remote-tracking references

View file

@ -30,6 +30,7 @@
'textCreateBranchFrom': {{.root.locale.Tr "repo.branch.create_from"}}, 'textCreateBranchFrom': {{.root.locale.Tr "repo.branch.create_from"}},
'textBranches': {{.root.locale.Tr "repo.branches"}}, 'textBranches': {{.root.locale.Tr "repo.branches"}},
'textTags': {{.root.locale.Tr "repo.tags"}}, 'textTags': {{.root.locale.Tr "repo.tags"}},
'textDefaultBranchLabel': {{.root.locale.Tr "repo.default_branch_label"}},
'mode': '{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}', 'mode': '{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}',
'showBranchesInDropdown': {{$showBranchesInDropdown}}, 'showBranchesInDropdown': {{$showBranchesInDropdown}},

View file

@ -30,6 +30,9 @@
<div class="loading-indicator is-loading" v-if="isLoading"/> <div class="loading-indicator is-loading" v-if="isLoading"/>
<div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active === index}" @click="selectItem(item)" :ref="'listItem' + index"> <div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active === index}" @click="selectItem(item)" :ref="'listItem' + index">
{{ item.name }} {{ item.name }}
<div class="ui label" v-if="item.name===defaultBranch && mode === 'branches'">
{{ textDefaultBranchLabel }}
</div>
<a v-show="enableFeed && mode === 'branches'" role="button" class="rss-icon ui compact right" :href="rssURLPrefix + item.url" target="_blank" @click.stop> <a v-show="enableFeed && mode === 'branches'" role="button" class="rss-icon ui compact right" :href="rssURLPrefix + item.url" target="_blank" @click.stop>
<!-- creating a lot of Vue component is pretty slow, so we use a static SVG here --> <!-- creating a lot of Vue component is pretty slow, so we use a static SVG here -->
<svg width="14" height="14" class="svg octicon-rss"><use href="#svg-symbol-octicon-rss"/></svg> <svg width="14" height="14" class="svg octicon-rss"><use href="#svg-symbol-octicon-rss"/></svg>