Skip to content

Commit

Permalink
Update octicons and use octicon-file-directory-symlink (#25453)
Browse files Browse the repository at this point in the history
Make use of the [new
octicon](primer/octicons#945) that indicates a
symlink to a directory:

<img width="189" alt="Screenshot 2023-06-22 at 22 50 57"
src="https://github.com/go-gitea/gitea/assets/115237/a70690ea-ebfc-48fe-af23-cdc33bcb2098">
  • Loading branch information
silverwind authored Jun 22, 2023
1 parent 6281ebf commit d2142ba
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/base/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func EntryIcon(entry *git.TreeEntry) string {
return "file-symlink-file"
}
if te.IsDir() {
return "file-submodule"
return "file-directory-symlink"
}
return "file-symlink-file"
case entry.IsDir():
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@github/relative-time-element": "4.3.0",
"@github/text-expander-element": "2.5.0",
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
"@primer/octicons": "19.3.0",
"@primer/octicons": "19.4.0",
"@webcomponents/custom-elements": "1.6.0",
"add-asset-webpack-plugin": "2.0.1",
"ansi_up": "5.2.1",
Expand Down
2 changes: 1 addition & 1 deletion public/img/svg/octicon-copilot-error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/svg/octicon-copilot-warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-file-directory-symlink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/integration/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestViewRepoWithSymlinks(t *testing.T) {
})
assert.Len(t, items, 5)
assert.Equal(t, "a: svg octicon-file-directory-fill", items[0])
assert.Equal(t, "link_b: svg octicon-file-submodule", items[1])
assert.Equal(t, "link_b: svg octicon-file-directory-symlink", items[1])
assert.Equal(t, "link_d: svg octicon-file-symlink-file", items[2])
assert.Equal(t, "link_hi: svg octicon-file-symlink-file", items[3])
assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4])
Expand Down
3 changes: 2 additions & 1 deletion web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@
}

.repository.file.list #repo-files-table tbody .svg.octicon-file,
.repository.file.list #repo-files-table tbody .svg.octicon-file-symlink-file {
.repository.file.list #repo-files-table tbody .svg.octicon-file-symlink-file,
.repository.file.list #repo-files-table tbody .svg.octicon-file-directory-symlink {
color: var(--color-secondary-dark-7);
}

Expand Down

0 comments on commit d2142ba

Please sign in to comment.