mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-26 06:46:59 +08:00
Fix repo home file list (#32788)
1. use grid instead of table, completely drop "ui table" from that list 2. move some "commit sign" related styles into a new file by the way (no change) because I need to figure out where `#repo-files-table` is used. 3. move legacy "branch/tag selector" related code into repo-legacy.ts, now there are 13 `import $` files left.
This commit is contained in:
@ -49,7 +49,7 @@ func testViewRepo(t *testing.T) {
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR")
|
||||
files := htmlDoc.doc.Find("#repo-files-table .repo-file-item")
|
||||
|
||||
type file struct {
|
||||
fileName string
|
||||
@ -61,7 +61,7 @@ func testViewRepo(t *testing.T) {
|
||||
var items []file
|
||||
|
||||
files.Each(func(i int, s *goquery.Selection) {
|
||||
tds := s.Find("td")
|
||||
tds := s.Find(".repo-file-cell")
|
||||
var f file
|
||||
tds.Each(func(i int, s *goquery.Selection) {
|
||||
if i == 0 {
|
||||
@ -161,7 +161,7 @@ func TestViewRepoWithSymlinks(t *testing.T) {
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name > SPAN.truncate")
|
||||
files := htmlDoc.doc.Find("#repo-files-table .repo-file-cell.name")
|
||||
items := files.Map(func(i int, s *goquery.Selection) string {
|
||||
cls, _ := s.Find("SVG").Attr("class")
|
||||
file := strings.Trim(s.Find("A").Text(), " \t\n")
|
||||
|
Reference in New Issue
Block a user