mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-17 17:32:56 +02:00
fix
This commit is contained in:
parent
67a749f52c
commit
c0e2fd2e7d
@ -7,17 +7,12 @@
|
|||||||
{{template "repo/sub_menu" .}}
|
{{template "repo/sub_menu" .}}
|
||||||
<div class="repo-button-row">
|
<div class="repo-button-row">
|
||||||
<div class="repo-button-row-left">
|
<div class="repo-button-row-left">
|
||||||
{{- template "repo/branch_dropdown" dict
|
{{if $hasTreeSidebar}}
|
||||||
"Repository" .Repository
|
<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"}}">
|
||||||
"ShowTabBranches" true
|
{{svg "octicon-sidebar-collapse" 20 "icon"}}
|
||||||
"ShowTabTags" true
|
</button>
|
||||||
"CurrentRefType" .RefFullName.RefType
|
{{end}}
|
||||||
"CurrentRefShortName" .RefFullName.ShortName
|
{{template "repo/home_branch_dropdown" (dict "ctxData" .)}}
|
||||||
"CurrentTreePath" .TreePath
|
|
||||||
"RefLinkTemplate" "{RepoLink}/src/{RefTypeNameSubURL}/{TreePath}"
|
|
||||||
"AllowCreateNewRef" .CanCreateBranch
|
|
||||||
"ShowViewAllRefsEntry" true
|
|
||||||
-}}
|
|
||||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||||
{{$cmpBranch := ""}}
|
{{$cmpBranch := ""}}
|
||||||
{{if ne .Repository.ID .BaseRepo.ID}}
|
{{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 apiBaseUrl = fileTree.getAttribute('data-api-base-url');
|
||||||
const refType = fileTree.getAttribute('data-current-ref-type');
|
const refType = fileTree.getAttribute('data-current-ref-type');
|
||||||
const refName = fileTree.getAttribute('data-current-ref-short-name');
|
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();
|
const json = await response.json();
|
||||||
if (json instanceof Array) {
|
if (json instanceof Array) {
|
||||||
return json.map((i) => ({
|
return json.map((i) => ({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user