mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-16 19:43:05 +02:00
fix
This commit is contained in:
parent
67a749f52c
commit
c0e2fd2e7d
@ -7,17 +7,12 @@
|
||||
{{template "repo/sub_menu" .}}
|
||||
<div class="repo-button-row">
|
||||
<div class="repo-button-row-left">
|
||||
{{- template "repo/branch_dropdown" dict
|
||||
"Repository" .Repository
|
||||
"ShowTabBranches" true
|
||||
"ShowTabTags" true
|
||||
"CurrentRefType" .RefFullName.RefType
|
||||
"CurrentRefShortName" .RefFullName.ShortName
|
||||
"CurrentTreePath" .TreePath
|
||||
"RefLinkTemplate" "{RepoLink}/src/{RefTypeNameSubURL}/{TreePath}"
|
||||
"AllowCreateNewRef" .CanCreateBranch
|
||||
"ShowViewAllRefsEntry" true
|
||||
-}}
|
||||
{{if $hasTreeSidebar}}
|
||||
<button class="show-tree-sidebar-button ui compact basic button icon not-mobile {{if $showTreeSidebar}}tw-hidden{{end}}" title="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}">
|
||||
{{svg "octicon-sidebar-collapse" 20 "icon"}}
|
||||
</button>
|
||||
{{end}}
|
||||
{{template "repo/home_branch_dropdown" (dict "ctxData" .)}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
{{$cmpBranch := ""}}
|
||||
{{if ne .Repository.ID .BaseRepo.ID}}
|
||||
|
@ -32,7 +32,7 @@ async function loadChildren(item, recursive?: boolean) {
|
||||
const apiBaseUrl = fileTree.getAttribute('data-api-base-url');
|
||||
const refType = fileTree.getAttribute('data-current-ref-type');
|
||||
const refName = fileTree.getAttribute('data-current-ref-short-name');
|
||||
const response = await GET(`${apiBaseUrl}/tree/${item ? item.path : ''}?ref=${refType}/${refName}&recursive=${recursive ?? false}`);
|
||||
const response = await GET(`${apiBaseUrl}/tree/${item ? item.path : ''}?ref_type=${refType}&ref_name=${refName}&recursive=${recursive ?? false}`);
|
||||
const json = await response.json();
|
||||
if (json instanceof Array) {
|
||||
return json.map((i) => ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user