|
14 | 14 |
|
15 | 15 | Search "repo/branch_dropdown" in the template directory to find all occurrences. |
16 | 16 | */}} |
17 | | -<div class="{{if .ContainerClasses}}{{.ContainerClasses}}{{end}}" |
18 | | - data-global-init="initRepoBranchTagSelector" |
19 | | - data-text-release-compare="{{ctx.Locale.Tr "repo.release.compare"}}" |
20 | | - data-text-branches="{{ctx.Locale.Tr "repo.branches"}}" |
21 | | - data-text-tags="{{ctx.Locale.Tr "repo.tags"}}" |
22 | | - data-text-filter-branch="{{ctx.Locale.Tr "repo.pulls.filter_branch"}}" |
23 | | - data-text-filter-tag="{{ctx.Locale.Tr "repo.find_tag"}}" |
24 | | - data-text-default-branch-label="{{ctx.Locale.Tr "repo.default_branch_label"}}" |
25 | | - data-text-create-tag="{{ctx.Locale.Tr "repo.tag.create_tag"}}" |
26 | | - data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}" |
27 | | - data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}" |
28 | | - data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}" |
29 | | - data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}" |
30 | | - data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}" |
| 17 | +<div class="global-shortcut-wrapper tw-inline-block"> |
| 18 | + <div class="{{if .ContainerClasses}}{{.ContainerClasses}}{{end}}" |
| 19 | + data-global-init="initRepoBranchTagSelector" |
| 20 | + data-text-release-compare="{{ctx.Locale.Tr "repo.release.compare"}}" |
| 21 | + data-text-branches="{{ctx.Locale.Tr "repo.branches"}}" |
| 22 | + data-text-tags="{{ctx.Locale.Tr "repo.tags"}}" |
| 23 | + data-text-filter-branch="{{ctx.Locale.Tr "repo.pulls.filter_branch"}}" |
| 24 | + data-text-filter-tag="{{ctx.Locale.Tr "repo.find_tag"}}" |
| 25 | + data-text-default-branch-label="{{ctx.Locale.Tr "repo.default_branch_label"}}" |
| 26 | + data-text-create-tag="{{ctx.Locale.Tr "repo.tag.create_tag"}}" |
| 27 | + data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}" |
| 28 | + data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}" |
| 29 | + data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}" |
| 30 | + data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}" |
| 31 | + data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}" |
31 | 32 |
|
32 | | - data-current-repo-default-branch="{{.Repository.DefaultBranch}}" |
33 | | - data-current-repo-link="{{.Repository.Link}}" |
34 | | - data-current-tree-path="{{.CurrentTreePath}}" |
35 | | - data-current-ref-type="{{.CurrentRefType}}" |
36 | | - data-current-ref-short-name="{{.CurrentRefShortName}}" |
| 33 | + data-current-repo-default-branch="{{.Repository.DefaultBranch}}" |
| 34 | + data-current-repo-link="{{.Repository.Link}}" |
| 35 | + data-current-tree-path="{{.CurrentTreePath}}" |
| 36 | + data-current-ref-type="{{.CurrentRefType}}" |
| 37 | + data-current-ref-short-name="{{.CurrentRefShortName}}" |
37 | 38 |
|
38 | | - data-ref-link-template="{{.RefLinkTemplate}}" |
39 | | - data-ref-form-action-template="{{.RefFormActionTemplate}}" |
40 | | - data-dropdown-fixed-text="{{.DropdownFixedText}}" |
41 | | - data-show-tab-branches="{{.ShowTabBranches}}" |
42 | | - data-show-tab-tags="{{.ShowTabTags}}" |
43 | | - data-allow-create-new-ref="{{.AllowCreateNewRef}}" |
44 | | - data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}" |
| 39 | + data-ref-link-template="{{.RefLinkTemplate}}" |
| 40 | + data-ref-form-action-template="{{.RefFormActionTemplate}}" |
| 41 | + data-dropdown-fixed-text="{{.DropdownFixedText}}" |
| 42 | + data-show-tab-branches="{{.ShowTabBranches}}" |
| 43 | + data-show-tab-tags="{{.ShowTabTags}}" |
| 44 | + data-allow-create-new-ref="{{.AllowCreateNewRef}}" |
| 45 | + data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}" |
45 | 46 |
|
46 | | - data-enable-feed="{{ctx.RootData.EnableFeed}}" |
47 | | -> |
48 | | - {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} |
49 | | - <div class="ui dropdown custom branch-selector-dropdown ellipsis-text-items"> |
50 | | - <div class="ui compact button branch-dropdown-button"> |
51 | | - <span class="flex-text-block gt-ellipsis"> |
52 | | - {{if .DropdownFixedText}} |
53 | | - {{.DropdownFixedText}} |
54 | | - {{else}} |
55 | | - {{if eq .CurrentRefType "tag"}} |
56 | | - {{svg "octicon-tag"}} |
57 | | - {{else if eq .CurrentRefType "branch"}} |
58 | | - {{svg "octicon-git-branch"}} |
| 47 | + data-enable-feed="{{ctx.RootData.EnableFeed}}" |
| 48 | + > |
| 49 | + {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} |
| 50 | + <div class="ui dropdown custom branch-selector-dropdown ellipsis-text-items"> |
| 51 | + <div class="ui compact button branch-dropdown-button"> |
| 52 | + <span class="flex-text-block gt-ellipsis"> |
| 53 | + {{if .DropdownFixedText}} |
| 54 | + {{.DropdownFixedText}} |
59 | 55 | {{else}} |
60 | | - {{svg "octicon-git-commit"}} |
| 56 | + {{if eq .CurrentRefType "tag"}} |
| 57 | + {{svg "octicon-tag"}} |
| 58 | + {{else if eq .CurrentRefType "branch"}} |
| 59 | + {{svg "octicon-git-branch"}} |
| 60 | + {{else}} |
| 61 | + {{svg "octicon-git-commit"}} |
| 62 | + {{end}} |
| 63 | + <strong class="tw-inline-block gt-ellipsis">{{.CurrentRefShortName}}</strong> |
61 | 64 | {{end}} |
62 | | - <strong class="tw-inline-block gt-ellipsis">{{.CurrentRefShortName}}</strong> |
63 | | - {{end}} |
64 | | - </span> |
65 | | - {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 65 | + </span> |
| 66 | + {{svg "octicon-triangle-down" 14 "dropdown icon"}} |
| 67 | + </div> |
66 | 68 | </div> |
67 | 69 | </div> |
| 70 | + <kbd data-global-init="onGlobalShortcut" data-shortcut-keys="w" class="tw-hidden">W</kbd> |
68 | 71 | </div> |
0 commit comments