Skip to content

Commit 6cab203

Browse files
committed
clean up
1 parent 40b61f3 commit 6cab203

File tree

5 files changed

+14
-20
lines changed

5 files changed

+14
-20
lines changed

services/contexttest/context_tests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"code.gitea.io/gitea/models/unittest"
2121
user_model "code.gitea.io/gitea/models/user"
2222
"code.gitea.io/gitea/modules/cache"
23-
git2 "code.gitea.io/gitea/modules/git"
23+
git_module "code.gitea.io/gitea/modules/git"
2424
"code.gitea.io/gitea/modules/gitrepo"
2525
"code.gitea.io/gitea/modules/reqctx"
2626
"code.gitea.io/gitea/modules/session"
@@ -146,7 +146,7 @@ func LoadRepoCommit(t *testing.T, ctx gocontext.Context) {
146146
defer gitRepo.Close()
147147

148148
if repo.RefFullName == "" {
149-
repo.RefFullName = git2.RefNameFromBranch(repo.Repository.DefaultBranch)
149+
repo.RefFullName = git_module.RefNameFromBranch(repo.Repository.DefaultBranch)
150150
}
151151
if repo.RefFullName.IsPull() {
152152
repo.BranchName = repo.RefFullName.ShortName()

templates/repo/home_branch_dropdown.tmpl

Lines changed: 0 additions & 12 deletions
This file was deleted.

templates/repo/view_content.tmpl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@
99
</button>
1010
{{end}}
1111

12-
{{template "repo/home_branch_dropdown" (dict "ctxData" .)}}
12+
{{template "repo/branch_dropdown" dict
13+
"Repository" .Repository
14+
"ShowTabBranches" true
15+
"ShowTabTags" true
16+
"CurrentRefType" .RefFullName.RefType
17+
"CurrentRefShortName" .RefFullName.ShortName
18+
"CurrentTreePath" .TreePath
19+
"RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}"
20+
"AllowCreateNewRef" .CanCreateBranch
21+
"ShowViewAllRefsEntry" true
22+
}}
1323

1424
{{if and .CanCompareOrPull .RefFullName.IsBranch (not .Repository.IsArchived)}}
1525
{{$cmpBranch := ""}}

templates/repo/view_file_tree_sidebar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<b>Files</b>
66
</div>
77

8-
<!--// TODO: Dynamically move components such as refSelector and createPR here-->
8+
{{/* TODO: Dynamically move components such as refSelector and createPR here */}}
99
<div class="view-file-tree-sidebar-bottom tw-overflow-auto">
1010
<div id="view-file-tree" class="is-loading"
1111
data-repo-link="{{.RepoLink}}"

web_src/css/repo/home.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@
5959
flex: 1;
6060
}
6161

62-
#view-file-tree.is-loading {
63-
aspect-ratio: 5.415; /* the size is about 790 x 145 */
64-
}
65-
6662
.repo-view-with-sidebar .repo-view-file-tree-sidebar {
6763
flex: 0 1 15%;
6864
display: flex;

0 commit comments

Comments
 (0)