Skip to content

Commit d9e8eb0

Browse files
committed
fix branch dropdown
1 parent cf5db37 commit d9e8eb0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

templates/repo/branch_dropdown.tmpl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
5252
{{if .DropdownFixedText}}
5353
{{.DropdownFixedText}}
5454
{{else}}
55-
{{if .ShowTabTags}}
55+
{{if eq .CurrentRefType "tag"}}
5656
{{svg "octicon-tag"}}
57-
{{else if .ShowTabBranches}}
57+
{{else if eq .CurrentRefType "branch"}}
5858
{{svg "octicon-git-branch"}}
59+
{{else}}
60+
{{svg "octicon-git-commit"}}
5961
{{end}}
60-
<strong class="tw-inline-block gt-ellipsis">{{.SelectedRefShortName}}</strong>
62+
<strong class="tw-inline-block gt-ellipsis">{{.CurrentRefShortName}}</strong>
6163
{{end}}
6264
</span>
6365
{{svg "octicon-triangle-down" 14 "dropdown icon"}}

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ export default defineComponent({
222222
<template v-if="dropdownFixedText">{{ dropdownFixedText }}</template>
223223
<template v-else>
224224
<svg-icon v-if="currentRefType === 'tag'" name="octicon-tag"/>
225-
<svg-icon v-else name="octicon-git-branch"/>
225+
<svg-icon v-else-if="currentRefType === 'branch'" name="octicon-git-branch"/>
226+
<svg-icon v-else name="octicon-git-commit"/>
226227
<strong ref="dropdownRefName" class="tw-inline-block gt-ellipsis">{{ currentRefShortName }}</strong>
227228
</template>
228229
</span>

0 commit comments

Comments
 (0)