forked from mirror/gitea
Update octicons and use octicon-file-directory-symlink
(#25453)
Make use of the [new octicon](https://github.com/primer/octicons/issues/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">
This commit is contained in:
parent
6281ebfec3
commit
d2142ba3c3
@ -210,7 +210,7 @@ func EntryIcon(entry *git.TreeEntry) string {
|
|||||||
return "file-symlink-file"
|
return "file-symlink-file"
|
||||||
}
|
}
|
||||||
if te.IsDir() {
|
if te.IsDir() {
|
||||||
return "file-submodule"
|
return "file-directory-symlink"
|
||||||
}
|
}
|
||||||
return "file-symlink-file"
|
return "file-symlink-file"
|
||||||
case entry.IsDir():
|
case entry.IsDir():
|
||||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@ -14,7 +14,7 @@
|
|||||||
"@github/relative-time-element": "4.3.0",
|
"@github/relative-time-element": "4.3.0",
|
||||||
"@github/text-expander-element": "2.5.0",
|
"@github/text-expander-element": "2.5.0",
|
||||||
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
||||||
"@primer/octicons": "19.3.0",
|
"@primer/octicons": "19.4.0",
|
||||||
"@webcomponents/custom-elements": "1.6.0",
|
"@webcomponents/custom-elements": "1.6.0",
|
||||||
"add-asset-webpack-plugin": "2.0.1",
|
"add-asset-webpack-plugin": "2.0.1",
|
||||||
"ansi_up": "5.2.1",
|
"ansi_up": "5.2.1",
|
||||||
@ -1235,9 +1235,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@primer/octicons": {
|
"node_modules/@primer/octicons": {
|
||||||
"version": "19.3.0",
|
"version": "19.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-19.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-19.4.0.tgz",
|
||||||
"integrity": "sha512-hyIo54VPC3VI7ZyAgosiJcbhxq1gZLbBspZwN9cg1uImRd2E8T9JST3kGeezezJYPjG367FuF7p1L+gmLmeESw==",
|
"integrity": "sha512-92eXALm3ucZkzqpJmJbC+fR9ldiuNd4W4s2MZQNQIBahpg14emJ+I9fdHqCummFlfgyohLzXn++7rz0NlkqAJA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"object-assign": "^4.1.1"
|
"object-assign": "^4.1.1"
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"@github/relative-time-element": "4.3.0",
|
"@github/relative-time-element": "4.3.0",
|
||||||
"@github/text-expander-element": "2.5.0",
|
"@github/text-expander-element": "2.5.0",
|
||||||
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
||||||
"@primer/octicons": "19.3.0",
|
"@primer/octicons": "19.4.0",
|
||||||
"@webcomponents/custom-elements": "1.6.0",
|
"@webcomponents/custom-elements": "1.6.0",
|
||||||
"add-asset-webpack-plugin": "2.0.1",
|
"add-asset-webpack-plugin": "2.0.1",
|
||||||
"ansi_up": "5.2.1",
|
"ansi_up": "5.2.1",
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
1
public/img/svg/octicon-file-directory-symlink.svg
Normal file
1
public/img/svg/octicon-file-directory-symlink.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="svg octicon-file-directory-symlink" width="16" height="16" aria-hidden="true"><path d="M0 2.75C0 1.784.784 1 1.75 1H5a1.75 1.75 0 0 1 1.4.7l.9 1.2a.25.25 0 0 0 .2.1h6.75c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 15H5.375a.75.75 0 0 1 0-1.5h8.875a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H7.5a1.75 1.75 0 0 1-1.4-.7l-.9-1.2a.25.25 0 0 0-.2-.1H1.75a.25.25 0 0 0-.25.25v3a.75.75 0 0 1-1.5 0v-3Z"/><path d="M1.5 12.237a2.25 2.25 0 0 1 2.262-2.249L4 9.989v1.938c0 .218.26.331.42.183l2.883-2.677a.25.25 0 0 0 0-.366L4.42 6.39a.25.25 0 0 0-.42.183v1.916l-.229-.001A3.75 3.75 0 0 0 0 12.237v1.013a.75.75 0 0 0 1.5 0v-1.013Z"/></svg>
|
After Width: | Height: | Size: 706 B |
@ -170,7 +170,7 @@ func TestViewRepoWithSymlinks(t *testing.T) {
|
|||||||
})
|
})
|
||||||
assert.Len(t, items, 5)
|
assert.Len(t, items, 5)
|
||||||
assert.Equal(t, "a: svg octicon-file-directory-fill", items[0])
|
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_d: svg octicon-file-symlink-file", items[2])
|
||||||
assert.Equal(t, "link_hi: svg octicon-file-symlink-file", items[3])
|
assert.Equal(t, "link_hi: svg octicon-file-symlink-file", items[3])
|
||||||
assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4])
|
assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4])
|
||||||
|
@ -281,7 +281,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.repository.file.list #repo-files-table tbody .svg.octicon-file,
|
.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);
|
color: var(--color-secondary-dark-7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user