1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 12:18:36 +00:00

Add file tree to file view page (#32721)

Resolve #29328

This pull request introduces a file tree on the left side when reviewing
files of a repository.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Kerwin Bryant
2025-03-15 16:26:49 +08:00
committed by GitHub
parent 926f0a19be
commit 92f997ce6b
22 changed files with 696 additions and 162 deletions

View File

@@ -0,0 +1,15 @@
<div class="flex-text-block tw-mb-2">
<button class="ui compact tiny icon button"
data-global-click="onRepoViewFileTreeToggle" data-toggle-action="hide"
data-tooltip-content="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{svg "octicon-sidebar-expand"}}
</button>
<b>Files</b>
</div>
{{/* TODO: Dynamically move components such as refSelector and createPR here */}}
<div id="view-file-tree" class="tw-overflow-auto tw-h-full is-loading"
data-repo-link="{{.RepoLink}}"
data-tree-path="{{$.TreePath}}"
data-current-ref-name-sub-url="{{.RefTypeNameSubURL}}"
></div>