Update tab title when navigating file tree (#35757) (#35772)

Backport #35757 by bytedream
This commit is contained in:
Giteabot
2025-10-29 14:04:19 +00:00
committed by GitHub
parent 45a88e09af
commit 88a8571b93
7 changed files with 17 additions and 7 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ func prepareFileView(ctx *context.Context, entry *git.TreeEntry) {
blob := entry.Blob()
ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+path.Base(ctx.Repo.TreePath), ctx.Repo.RefFullName.ShortName())
ctx.Data["Title"] = ctx.Tr("repo.file.title", ctx.Repo.Repository.Name+"/"+ctx.Repo.TreePath, ctx.Repo.RefFullName.ShortName())
ctx.Data["FileIsSymlink"] = entry.IsLink()
ctx.Data["FileTreePath"] = ctx.Repo.TreePath
ctx.Data["RawFileLink"] = ctx.Repo.RepoLink + "/raw/" + ctx.Repo.RefTypeNameSubURL() + "/" + util.PathEscapeSegments(ctx.Repo.TreePath)