mirror of https://github.com/gogs/gogs.git
Show file name in window/tab title
I've just encountered the problem that when browsing multiple files in different tabs, the tab title does not show the file name, which makes browsing a repository a happy game of memory for the entire family. This PR takes the fun away and should just display the file name in the title.pull/5896/head
parent
76b87b1bbd
commit
6565a4c875
|
@ -132,6 +132,7 @@ func renderFile(c *context.Context, entry *git.TreeEntry, treeLink, rawLink stri
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.Data["Title"] = blob.Name() + " - " + c.Data["Title"]
|
||||||
c.Data["FileSize"] = blob.Size()
|
c.Data["FileSize"] = blob.Size()
|
||||||
c.Data["FileName"] = blob.Name()
|
c.Data["FileName"] = blob.Name()
|
||||||
c.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())
|
c.Data["HighlightClass"] = highlight.FileNameToHighlightClass(blob.Name())
|
||||||
|
|
Loading…
Reference in New Issue