Improve tree not found page (#26570) (#27346)

Backport #26570 by @yp05327

Before:

![before](383822d5-7d77-4ec3-b49b-4ab1e8b167ce)

After:

![after](32afa0a3-fa05-4087-b96e-7d067f0ed756)

In Github:
https://github.com/yp05327/test/blob/main/test.drawio

Updated:
UI changed

![image](41ed07ff-b815-4b4e-9779-5ab36b5f3980)

![image](5d7b28d6-a2fc-4d4c-8d6d-d93f9c9a270b)

Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot 2023-09-29 18:35:11 +08:00 committed by GitHub
parent f77b4cb4a2
commit 84ee02faa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 8 deletions

View file

@ -70,7 +70,7 @@ func RefBlame(ctx *context.Context) {
// Get current entry user currently looking at.
entry, err := ctx.Repo.Commit.GetTreeEntryByPath(ctx.Repo.TreePath)
if err != nil {
ctx.NotFoundOrServerError("Repo.Commit.GetTreeEntryByPath", git.IsErrNotExist, err)
HandleGitError(ctx, "Repo.Commit.GetTreeEntryByPath", err)
return
}